]> git.sesse.net Git - stockfish/commitdiff
Extend dangerous passed pawn moves (#2089)
authormiguel-l <miguel_lahoz@protonmail.com>
Wed, 10 Apr 2019 17:35:47 +0000 (01:35 +0800)
committerMarco Costalba <mcostalba@users.noreply.github.com>
Wed, 10 Apr 2019 17:35:47 +0000 (19:35 +0200)
Introduce a new search extension when pushing an advanced passed pawn is
also suggested by the first killer move. There have been previous tests
which have similar ideas, mostly about pawn pushes, but it seems to be
overkill to extend too many moves. My idea is to limit the extension to
when a move happens to be noteworthy in some other way as well, such as
in this case, when it is also a killer move.

STC:
LLR: 2.96 (-2.94,2.94) [0.50,4.50]
Total: 19027 W: 4326 L: 4067 D: 10634
http://tests.stockfishchess.org/tests/view/5cac2cde0ebc5925cf00c36d

LTC:
LLR: 2.94 (-2.94,2.94) [0.00,3.50]
Total: 93390 W: 15995 L: 15555 D: 61840
http://tests.stockfishchess.org/tests/view/5cac42270ebc5925cf00c4b9

For future tests, it looks like this will interact heavily with passed
pawn evaluation. It may be good to try more variants of some of the more
promising evaluations tests/tweaks.

Bench: 3666092

src/search.cpp

index a9a62dbf8477926c2a53ae2759eee4f4cb4a0f56..7fffae263008e0175cc553844b0adc7137536fd0 100644 (file)
@@ -942,6 +942,12 @@ moves_loop: // When in check, search starts from here
       else if (type_of(move) == CASTLING)
           extension = ONE_PLY;
 
+      // Passed pawn extension
+      else if (   move == ss->killers[0]
+               && pos.advanced_pawn_push(move)
+               && pos.pawn_passed(us, to_sq(move)))
+          extension = ONE_PLY;
+
       // Calculate new depth for this move
       newDepth = depth - ONE_PLY + extension;