From: Joona Kiiski Date: Sun, 21 Mar 2010 21:41:50 +0000 (+0200) Subject: Do not return unproven mate scores from null move search X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=42de93ac15366d6d20c1b2fbf99b4780e8ac6617 Do not return unproven mate scores from null move search Causes very small functional change which is not observable with our usual set of test positions. However change is observable fx. with following position: 4k3/3r4/5Q2/6K1/8/8/8/8 w - - 0 1 go depth 24 Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index f5552e78..67c98709 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1378,6 +1378,10 @@ namespace { if (nullValue >= beta) { + // Do not return unproven mate scores + if (nullValue >= value_mate_in(PLY_MAX)) + nullValue = beta; + if (depth < 6 * OnePly) return nullValue;