Skip to content

Commit

Permalink
Don't override 60 move draws with 2 fold mates.
Browse files Browse the repository at this point in the history
  • Loading branch information
PikaCat-OuO committed Oct 16, 2024
1 parent 09f2c13 commit 79e8d50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,8 @@ bool Position::rule_judge(Value& result, int ply) {
// 2 fold mates need further investigations
if (filter[st->key] <= 1)
{
// Have the same previous step
if (st->previous->key == stp->previous->key)
// Not exceeding rule 60 and have the same previous step
if (st->rule60 < 120 && st->previous->key == stp->previous->key)
{
// Even if we entering this loop again, it will not lead to a 3 fold repetition
StateInfo* next = stp;
Expand Down

0 comments on commit 79e8d50

Please sign in to comment.