Skip to content

Commit e12fc10

Browse files
committed
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 #1710 Bench: 4688817
1 parent 313f403 commit e12fc10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/evaluate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ namespace {
159159
constexpr Score CloseEnemies = S( 6, 0);
160160
constexpr Score CorneredBishop = S( 50, 50);
161161
constexpr Score Hanging = S( 52, 30);
162-
constexpr Score HinderPassedPawn = S( 4, 0);
162+
constexpr Score HinderPassedPawn = S( 8, 0);
163163
constexpr Score KingProtector = S( 6, 6);
164164
constexpr Score KnightOnQueen = S( 21, 11);
165165
constexpr Score LongDiagonalBishop = S( 22, 0);
@@ -637,7 +637,7 @@ namespace {
637637
assert(!(pos.pieces(Them, PAWN) & forward_file_bb(Us, s + Up)));
638638

639639
bb = forward_file_bb(Us, s) & pos.pieces(Them);
640-
score -= HinderPassedPawn * popcount(bb);
640+
score -= HinderPassedPawn * bool(bb);
641641

642642
int r = relative_rank(Us, s);
643643
int w = PassedDanger[r];

0 commit comments

Comments
 (0)