1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 11:39:15 +00:00

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
This commit is contained in:
Stéphane Nicolet 2018-07-27 09:39:06 +02:00
parent 313f403733
commit e12fc10b5c

View file

@ -159,7 +159,7 @@ namespace {
constexpr Score CloseEnemies = S( 6, 0); constexpr Score CloseEnemies = S( 6, 0);
constexpr Score CorneredBishop = S( 50, 50); constexpr Score CorneredBishop = S( 50, 50);
constexpr Score Hanging = S( 52, 30); 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 KingProtector = S( 6, 6);
constexpr Score KnightOnQueen = S( 21, 11); constexpr Score KnightOnQueen = S( 21, 11);
constexpr Score LongDiagonalBishop = S( 22, 0); constexpr Score LongDiagonalBishop = S( 22, 0);
@ -637,7 +637,7 @@ namespace {
assert(!(pos.pieces(Them, PAWN) & forward_file_bb(Us, s + Up))); assert(!(pos.pieces(Them, PAWN) & forward_file_bb(Us, s + Up)));
bb = forward_file_bb(Us, s) & pos.pieces(Them); bb = forward_file_bb(Us, s) & pos.pieces(Them);
score -= HinderPassedPawn * popcount(bb); score -= HinderPassedPawn * bool(bb);
int r = relative_rank(Us, s); int r = relative_rank(Us, s);
int w = PassedDanger[r]; int w = PassedDanger[r];