From: Stéphane Nicolet Date: Fri, 27 Jul 2018 07:39:06 +0000 (+0200) Subject: Remove a popcount for HinderPassedPawn X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=e12fc10b5cf4ac1518a18a54c4e368ef2dc55bfc Remove a popcount for HinderPassedPawn Remove a popcount for HinderPassedPawn, and compensate by doubling the bonus from S(4,0) to to S(8,0). Maybe it was pure luck, but we got the idea of this Elo gaining patch by seing the simplification attempt by Mike Whiteley in pull request #1703. This suggests that whenever we have a passed evaluation simplification, we should consider the possibility that the master bonus has become slightly out of tune with time, and we should try a few Elo gaining [0..4] tests by hand-tuning the master bonus. STC: LLR: 2.95 (-2.94,2.94) [0.00,4.00] Total: 19136 W: 4388 L: 4147 D: 10601 http://tests.stockfishchess.org/tests/view/5b59be6f0ebc5902bdb8ac06 LTC: LLR: 2.96 (-2.94,2.94) [0.00,4.00] Total: 99382 W: 17324 L: 16843 D: 65215 http://tests.stockfishchess.org/tests/view/5b59d2410ebc5902bdb8afa8 Closes https://github.com/official-stockfish/Stockfish/pull/1710 Bench: 4688817 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index d552bd6d..5f4a1ab1 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -159,7 +159,7 @@ namespace { constexpr Score CloseEnemies = S( 6, 0); constexpr Score CorneredBishop = S( 50, 50); constexpr Score Hanging = S( 52, 30); - constexpr Score HinderPassedPawn = S( 4, 0); + constexpr Score HinderPassedPawn = S( 8, 0); constexpr Score KingProtector = S( 6, 6); constexpr Score KnightOnQueen = S( 21, 11); constexpr Score LongDiagonalBishop = S( 22, 0); @@ -637,7 +637,7 @@ namespace { assert(!(pos.pieces(Them, PAWN) & forward_file_bb(Us, s + Up))); bb = forward_file_bb(Us, s) & pos.pieces(Them); - score -= HinderPassedPawn * popcount(bb); + score -= HinderPassedPawn * bool(bb); int r = relative_rank(Us, s); int w = PassedDanger[r];