]> git.sesse.net Git - stockfish/commitdiff
Extend last non-pawn captures
authorMoez Jellouli <37274752+MJZ1977@users.noreply.github.com>
Sun, 24 Nov 2019 20:57:09 +0000 (21:57 +0100)
committerStéphane Nicolet <cassio@free.fr>
Mon, 25 Nov 2019 23:01:49 +0000 (00:01 +0100)
Extend last non-pawn captures at principal variation nodes because
they are in general decisive moves with clear endgame result.

STC
http://tests.stockfishchess.org/tests/view/5ddafc86e75c0005326d2140
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 9892 W: 2238 L: 2099 D: 5555

LTC
http://tests.stockfishchess.org/tests/view/5ddb0401e75c0005326d2150
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 30369 W: 5013 L: 4756 D: 20600

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

Bench: 5059526

src/search.cpp

index d3f38aae10954ec1eadefdbbc59cb6548e21b837..e976274f28fd4369dc8793b4782e80ef7e7cabc7 100644 (file)
@@ -1049,6 +1049,12 @@ moves_loop: // When in check, search starts from here
                && pos.pawn_passed(us, to_sq(move)))
           extension = 1;
 
+      // Last captures extension
+      else if (   PvNode
+               && PieceValue[EG][pos.captured_piece()] > PawnValueEg
+               && pos.non_pawn_material() <= 2 * RookValueMg)
+          extension = 1;
+
       // Castling extension
       if (type_of(move) == CASTLING)
           extension = 1;