]> git.sesse.net Git - stockfish/commit
Simplify HinderPassedPawn bonus
authorAlain SAVARD <support@multicim.com>
Sun, 24 Jun 2018 22:06:13 +0000 (18:06 -0400)
committerStéphane Nicolet <cassio@free.fr>
Tue, 26 Jun 2018 06:16:37 +0000 (08:16 +0200)
commitf0a7bed6fb8a95d7f3a8a226fc21159cb9b29810
tree9267c1760146424956adf5c8b9b1373ff674d645
parentefd4ca27c4d7abad41e0469aa9b3b26b12068914
Simplify HinderPassedPawn bonus

Make sure each piece is not scored more than once as a passed pawn "hinderer",
by scoring only the blockers along the passed pawn path. Inspired by TCEC Game 29.

Passed STC as a simplification
http://tests.stockfishchess.org/tests/view/5b3016d00ebc5902b2e58552
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 75388 W: 16656 L: 16641 D: 42091

Passed LTC as a simplification
http://tests.stockfishchess.org/tests/view/5b302ed90ebc5902b2e587fc
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 49157 W: 8460 L: 8386 D: 32311

Current master was also counting the number of attacks along a passed pawn path,
which might be misleading:

a) a defender might be counted many times for the same pawn path. For example a
   White rook on a1 attacking a black pawn on a7 would score the bonus * 6 but
   would be probably better placed on a8

b) a defender might be counted on different pawn paths and might be overloaded. For
   example a Ke4 or Qe4 against pawns on d6  and f6 would score the bonus * 6.

Counting each blocker or attacker only once is more complicated, and does not help
either: http://tests.stockfishchess.org/tests/view/5b2ff1cb0ebc5902b2e582b2

After this small simplification, there might be ways to increase the HinderPassedPawn
penalty.

Closes https://github.com/official-stockfish/Stockfish/pull/1661

Bench: 4520519
src/evaluate.cpp