Skip to content

Commit 6c197c3

Browse files
syzygy1vondele
authored andcommitted
Corrects a functional change in a cleanup patch.
This corrects a functional change in ddcbacd changing evaluation of KPPvK. Bench remains unchanged at low depth With this patch, 8/8/5k1p/8/7p/7K/8/8 b - - 1 11 is again correctly evaluated as a draw. closes #2807 Bench: 4366686
1 parent 1f3bd96 commit 6c197c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/endgame.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,8 @@ ScaleFactor Endgame<KPsK>::operator()(const Position& pos) const {
589589
Bitboard strongPawns = pos.pieces(strongSide, PAWN);
590590

591591
// If all pawns are ahead of the king on a single rook file, it's a draw.
592-
if (!((strongPawns & ~FileABB) || (strongPawns & ~FileHBB)) &&
593-
!(strongPawns & ~passed_pawn_span(weakSide, weakKing)))
592+
if ( !(strongPawns & ~(FileABB | FileHBB))
593+
&& !(strongPawns & ~passed_pawn_span(weakSide, weakKing)))
594594
return SCALE_FACTOR_DRAW;
595595

596596
return SCALE_FACTOR_NONE;

0 commit comments

Comments
 (0)