Skip to content

Commit

Permalink
Reduce the check for repetition to the positions since last 50 mr re…
Browse files Browse the repository at this point in the history
…set (#76)

Bench: 5806087
  • Loading branch information
PGG106 authored Nov 26, 2022
1 parent fbd3031 commit 21b49af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int PieceValue[15] = { 100, 300, 300, 450, 900, 0,

// IsRepetition handles the repetition detection of a position
static int IsRepetition(const S_Board* pos) {
for (int index = 0; index < pos->hisPly; index++)
for (int index = pos->hisPly - pos->fiftyMove; index < pos->hisPly; index++)
// if we found the hash key same with a current
if (pos->history[index].posKey == pos->posKey)
// we found a repetition
Expand Down

0 comments on commit 21b49af

Please sign in to comment.