]> git.sesse.net Git - stockfish/commitdiff
Extend captures and promotions
authorMichael Chaly <Vizvezdenec@gmail.com>
Sun, 5 Sep 2021 21:17:46 +0000 (00:17 +0300)
committerStéphane Nicolet <cassio@free.fr>
Mon, 6 Sep 2021 11:59:17 +0000 (13:59 +0200)
This patch introduces extension for captures and promotions. Every capture or
promotion that is not the first move in the list gets extended at PvNodes and
cutNodes. Special thanks to @locutus2 - all my previous attepmts that failed
on this idea were done only for PvNodes - idea to include also cutNodes was
based on his latest passed patch.

STC
https://tests.stockfishchess.org/tests/view/6134abf325b9b35584838574
LLR: 2.95 (-2.94,2.94) <-0.50,2.50>
Total: 188920 W: 47754 L: 47304 D: 93862
Ptnml(0-2): 595, 21754, 49344, 22140, 627

LTC
https://tests.stockfishchess.org/tests/view/613521de25b9b355848385d7
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 8768 W: 2283 L: 2098 D: 4387
Ptnml(0-2): 7, 866, 2452, 1053, 6

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

bench: 5564555

src/search.cpp

index 5aa506446c3f68ef7474e4ecd49709714926c622..0d7575aa5248433ae0d6e788ea40d8267b288cb8 100644 (file)
@@ -1094,6 +1094,14 @@ moves_loop: // When in check, search starts here
                   return beta;
           }
       }
+
+      // Capture extensions for PvNodes and cutNodes
+      else if (   (PvNode || cutNode) 
+               && captureOrPromotion 
+               && moveCount != 1)
+          extension = 1;
+
+      // Check extensions
       else if (   givesCheck
                && depth > 6
                && abs(ss->staticEval) > Value(100))