From: Fabian Fichter Date: Mon, 2 Dec 2019 20:48:39 +0000 (+0100) Subject: Fix endgame evaluation for KFsPs vs. K X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=fc51c54c28e6988ea3b55d43595893d46debe94e;p=fairystockfish.git Fix endgame evaluation for KFsPs vs. K Example: ``` setoption name UCI_Variant value makruk position fen 7k/8/5M2/5KMP/8/8/8/8 w - - 0 1 eval ``` --- diff --git a/src/endgame.cpp b/src/endgame.cpp index 8af27b9..a62bfce 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -395,7 +395,7 @@ Value Endgame::operator()(const Position& pos) const { Bitboard b = pos.pieces(strongSide, PAWN); while (b && (!dark || !light)) { - if (file_of(pop_lsb(&b)) % 2 == relative_rank(strongSide, pos.promotion_rank(), pos.max_rank()) % 2) + if (file_of(pop_lsb(&b)) % 2 != relative_rank(strongSide, pos.promotion_rank(), pos.max_rank()) % 2) light = true; else dark = true;