]> git.sesse.net Git - stockfish/commitdiff
Introduce recapture extensions
authorTaras Vuk <117687515+TarasVuk@users.noreply.github.com>
Mon, 13 Nov 2023 13:45:36 +0000 (14:45 +0100)
committerDisservin <disservin.social@gmail.com>
Wed, 15 Nov 2023 18:32:59 +0000 (19:32 +0100)
When in a PV-node this patch extends ttMove if it is a recapture and has a good
history.

Passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 83840 W: 21560 L: 21166 D: 41114
Ptnml(0-2): 343, 9905, 21027, 10305, 340
https://tests.stockfishchess.org/tests/view/654f4b02136acbc5735308ab

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 165318 W: 41068 L: 40476 D: 83774
Ptnml(0-2): 98, 18670, 44517, 19290, 84
https://tests.stockfishchess.org/tests/view/654fde04136acbc5735314e0

closes https://github.com/official-stockfish/Stockfish/pull/4872

Bench: 1393911

src/search.cpp

index 3ce74126aa7df7411c2c35d3d8f8d8489b85a911..5c53c0dae8bf6a14dade4b2ee3fe5b55f21eff0b 100644 (file)
@@ -1100,6 +1100,12 @@ moves_loop:  // When in check, search starts here
             else if (PvNode && move == ttMove && move == ss->killers[0]
                      && (*contHist[0])[movedPiece][to_sq(move)] >= 4194)
                 extension = 1;
+
+            // Recapture extensions (~1 Elo)
+            else if (PvNode && move == ttMove && to_sq(move) == prevSq
+                     && captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))]
+                          > 4000)
+                extension = 1;
         }
 
         // Add extension to new depth