]> git.sesse.net Git - stockfish/commitdiff
Reword singular extension comments
authorMarco Costalba <mcostalba@gmail.com>
Tue, 6 Jul 2010 08:08:35 +0000 (10:08 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 6 Jul 2010 16:56:04 +0000 (17:56 +0100)
Should be more stick to original definition (Hsu, Campbell)

No functional change.

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

index 8313381a4ccaec06ef891e2631d07b85fdc43f68..367368b738e0493a8ae0ac635ed693421ce77f5c 100644 (file)
@@ -1280,9 +1280,10 @@ namespace {
       // Step 11. Decide the new search depth
       ext = extension<PvNode>(pos, move, captureOrPromotion, moveIsCheck, singleEvasion, mateThreat, &dangerous);
 
       // Step 11. Decide the new search depth
       ext = extension<PvNode>(pos, move, captureOrPromotion, moveIsCheck, singleEvasion, mateThreat, &dangerous);
 
-      // Singular extension search. We extend the TT move if its value is much better than
-      // its siblings. To verify this we do a reduced search on all the other moves but the
-      // ttMove, if result is lower then ttValue minus a margin then we extend ttMove.
+      // Singular extension search. If all moves but one fail low on a search of (alpha-s, beta-s),
+      // and just one fails high on (alpha, beta), then that move is singular and should be extended.
+      // To verify this we do a reduced search on all the other moves but the ttMove, if result is
+      // lower then ttValue minus a margin then we extend ttMove.
       if (   singularExtensionNode
           && move == tte->move()
           && ext < OnePly)
       if (   singularExtensionNode
           && move == tte->move()
           && ext < OnePly)
@@ -1297,7 +1298,7 @@ namespace {
               Value v = search<NonPV>(pos, ss, b - 1, b, depth / 2, ply);
               ss->skipNullMove = false;
               ss->excludedMove = MOVE_NONE;
               Value v = search<NonPV>(pos, ss, b - 1, b, depth / 2, ply);
               ss->skipNullMove = false;
               ss->excludedMove = MOVE_NONE;
-              if (v < ttValue - SingularExtensionMargin)
+              if (v < b)
                   ext = OnePly;
           }
       }
                   ext = OnePly;
           }
       }