]> git.sesse.net Git - stockfish/commitdiff
Lower SingularExtensionDepth to 7 plies for non-pv
authorMarco Costalba <mcostalba@gmail.com>
Wed, 28 Jul 2010 07:39:28 +0000 (09:39 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 30 Jul 2010 21:50:03 +0000 (22:50 +0100)
To compensate for the extra work skip singular
searches deemed to fail because excluded node
failed high already in the past.

After 1200 games at 1+0
Mod vs Orig +387 =1274 -339  (+8 ELO)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 29b7c5f3ebab93a78b832a23905a0e07af535800..588f76f3e6b789c6d8d500c56aba12eaf61718c7 100644 (file)
@@ -198,7 +198,7 @@ namespace {
   Depth PassedPawnExtension[2], PawnEndgameExtension[2], MateThreatExtension[2];
 
   // Minimum depth for use of singular extension
   Depth PassedPawnExtension[2], PawnEndgameExtension[2], MateThreatExtension[2];
 
   // Minimum depth for use of singular extension
-  const Depth SingularExtensionDepth[2] = { 8 * OnePly /* non-PV */, 6 * OnePly /* PV */};
+  const Depth SingularExtensionDepth[2] = { 7 * OnePly /* non-PV */, 6 * OnePly /* PV */};
 
   // If the TT move is at least SingularExtensionMargin better then the
   // remaining ones we will extend it.
 
   // If the TT move is at least SingularExtensionMargin better then the
   // remaining ones we will extend it.
@@ -1213,6 +1213,17 @@ namespace {
                            && is_lower_bound(tte->type())
                            && tte->depth() >= depth - 3 * OnePly;
 
                            && is_lower_bound(tte->type())
                            && tte->depth() >= depth - 3 * OnePly;
 
+    // Avoid to do an expensive singular extension search on nodes where
+    // such search had already failed in the past.
+    if (  !PvNode
+        && singularExtensionNode
+        && depth < SingularExtensionDepth[PvNode] + 5 * OnePly)
+    {
+        TTEntry* ttx = TT.retrieve(pos.get_exclusion_key());
+        if (ttx && is_lower_bound(ttx->type()))
+            singularExtensionNode = false;
+    }
+
     // Step 10. Loop through moves
     // Loop through all legal moves until no moves remain or a beta cutoff occurs
     while (   bestValue < beta
     // Step 10. Loop through moves
     // Loop through all legal moves until no moves remain or a beta cutoff occurs
     while (   bestValue < beta