]> git.sesse.net Git - stockfish/commitdiff
Retire 'mate in x' hack
authorMarco Costalba <mcostalba@gmail.com>
Fri, 4 Jan 2013 15:29:13 +0000 (16:29 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 4 Jan 2013 15:30:46 +0000 (16:30 +0100)
Sometimes is faster, but not always and on very long mates
produces strange scores probably due to truncation of PV
artifacts.

So simply perform normal search also in case of UCI 'mate x'
command, with the only difference that when a mate in x is
found search returns immediately.

No functional change.

src/search.cpp

index c574058df4be545a297dc83f74da0c43203c4ecb..744d84f442e682808839cf5b1195b1555f821e2b 100644 (file)
@@ -602,11 +602,6 @@ namespace {
                  ss->staticEval, ss->evalMargin);
     }
 
-    // Handling of UCI command 'mate in x moves'. We simply return if after
-    // 'x' moves we still have not checkmated the opponent.
-    if (PvNode && !RootNode && !inCheck && Limits.mate && ss->ply > 2 * Limits.mate)
-        return eval;
-
     // Update gain for the parent non-capture move given the static position
     // evaluation before and after the move.
     if (   (move = (ss-1)->currentMove) != MOVE_NULL