]> git.sesse.net Git - stockfish/commitdiff
Research at intermediate depth if LMR is very high
authorRalph Stößer <ralph.stoesser@ralph_stoesser.(none)>
Mon, 9 Dec 2013 07:02:49 +0000 (08:02 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 9 Dec 2013 07:03:47 +0000 (08:03 +0100)
After a fail high in LMR, if reduction is very high do
a research at lower depth before teh full depth one.
Chances are that the re-search will fail low and the
full depth one is skipped.

Passed both short TC:
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 11363 W: 2204 L: 2069 D: 7090

And long TC:
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 7292 W: 1195 L: 1061 D: 5036

bench: 7869223

src/search.cpp

index 6aa1081f435e0cd666dc8ba3ba0dfcfdc2ebb245..a739b0491c7a9eae9219ba7e404c83483d04c692 100644 (file)
@@ -933,6 +933,13 @@ moves_loop: // When in check and at SpNode search starts from here
 
           value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d, true);
 
+          // Research at intermediate depth if reduction is very high
+          if (value > alpha && ss->reduction >= 4 * ONE_PLY)
+          {
+              Depth d2 = std::max(newDepth - 2 * ONE_PLY, ONE_PLY);
+              value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d2, true);
+          }
+
           doFullDepthSearch = (value > alpha && ss->reduction != DEPTH_ZERO);
           ss->reduction = DEPTH_ZERO;
       }