From: Fabian Fichter Date: Sun, 10 Nov 2019 16:05:07 +0000 (+0100) Subject: Mitigate perpetual check blindness X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=52a1faa9b4e7b0e6d07503f159b1556dc4bdad03;p=fairystockfish.git Mitigate perpetual check blindness Improve handling of problematic positions in #49. --- diff --git a/src/position.cpp b/src/position.cpp index 1eed7d8..7e86ba8 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1915,7 +1915,7 @@ bool Position::has_game_cycle(int ply) const { int end = captures_to_hand() ? st->pliesFromNull : std::min(st->rule50, st->pliesFromNull); - if (end < 3 || var->nFoldValue != VALUE_DRAW) + if (end < 3 || var->nFoldValue != VALUE_DRAW || var->perpetualCheckIllegal) return false; Key originalKey = st->key;