]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Adjust singular LMR for positions seen in PV
[stockfish] / src / search.cpp
index 70520ac9ff74049b534cbf720abd857bd3ac3b40..fe57806c7076198fee080a659dbd4d7161a5c46a 100644 (file)
@@ -1149,7 +1149,7 @@ moves_loop: // When in check, search starts from here
 
           // Decrease reduction if ttMove has been singularly extended (~3 Elo)
           if (singularLMR)
-              r -= 2;
+              r -= 1 + (ttPv && !PvNode);
 
           if (!captureOrPromotion)
           {
@@ -1193,10 +1193,16 @@ moves_loop: // When in check, search starts from here
 
           value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d, true);
 
-          doFullDepthSearch = (value > alpha && d != newDepth), didLMR = true;
+          doFullDepthSearch = value > alpha && d != newDepth;
+
+          didLMR = true;
       }
       else
-          doFullDepthSearch = !PvNode || moveCount > 1, didLMR = false;
+      {
+          doFullDepthSearch = !PvNode || moveCount > 1;
+
+          didLMR = false;
+      }
 
       // Step 17. Full depth search when LMR is skipped or fails high
       if (doFullDepthSearch)