From: Vizvezdenec Date: Sun, 29 Mar 2020 17:04:20 +0000 (+0300) Subject: Count only the most advanced passed pawn for each file. X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=f2430bf034cc31258c870797501bce0605bce3d0 Count only the most advanced passed pawn for each file. This patch adjusts definition of passed pawns - if there is a pawn of our color in the same file in front of a current pawn it's no longer counts as passed. passed STC https://tests.stockfishchess.org/tests/view/5e802037e42a5c3b3ca2ed07 LLR: 2.94 (-2.94,2.94) {-0.50,1.50} Total: 215296 W: 41843 L: 41341 D: 132112 Ptnml(0-2): 3688, 25313, 49304, 25495, 3848 passed LTC https://tests.stockfishchess.org/tests/view/5e806441e42a5c3b3ca2ed2b LLR: 2.95 (-2.94,2.94) {0.25,1.75} Total: 74050 W: 9761 L: 9379 D: 54910 Ptnml(0-2): 510, 6838, 22025, 7064, 588 closes https://github.com/official-stockfish/Stockfish/pull/2602 bench: 4902237 --- diff --git a/src/pawns.cpp b/src/pawns.cpp index 560fd76b..3023021d 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -124,6 +124,8 @@ namespace { || ( stoppers == blocked && r >= RANK_5 && (shift(support) & ~(theirPawns | doubleAttackThem))); + passed &= !(forward_file_bb(Us, s) & ourPawns); + // Passed pawns will be properly scored later in evaluation when we have // full attack info. if (passed)