]> git.sesse.net Git - stockfish/commitdiff
Decrease reductions in Lmr for some Pv nodes
authorMichael Chaly <Vizvezdenec@gmail.com>
Tue, 8 Mar 2022 07:56:07 +0000 (10:56 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Tue, 8 Mar 2022 19:19:42 +0000 (20:19 +0100)
This patch makes us reduce less in Lmr at pv nodes in case of static eval being far away from static evaluation of position.
Idea is that if it's the case then probably position is pretty complex so we can't be sure about how reliable LMR is so we need to reduce less.

Passed STC:
https://tests.stockfishchess.org/tests/view/6226276aa9d47c8160e81220
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 262696 W: 69944 L: 69239 D: 123513
Ptnml(0-2): 1399, 29702, 68436, 30417, 1394

Passed LTC:
https://tests.stockfishchess.org/tests/view/6226b002a9d47c8160e82b91
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 64008 W: 17320 L: 16982 D: 29706
Ptnml(0-2): 60, 6378, 18811, 6674, 81

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

bench 6678390

src/search.cpp

index a6552daf2a0e290b63b5720dd8e1c8b90fede2d9..3008079e9c4ade413f2ee829ba5af2a7b8ad4f42 100644 (file)
@@ -1166,6 +1166,11 @@ moves_loop: // When in check, search starts here
           if (ttCapture)
               r++;
 
+          // Decrease reduction at PvNodes if bestvalue
+          // is vastly different from static evaluation
+          if (PvNode && !ss->inCheck && abs(ss->staticEval - bestValue) > 250)
+              r--;
+
           ss->statScore =  thisThread->mainHistory[us][from_to(move)]
                          + (*contHist[0])[movedPiece][to_sq(move)]
                          + (*contHist[1])[movedPiece][to_sq(move)]