From 2d60995c004e4ddf010373ba84a766d2cbaf082e Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Fri, 4 Jan 2013 16:29:13 +0100 Subject: [PATCH 1/1] Retire 'mate in x' hack 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 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index c574058d..744d84f4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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 -- 2.39.2