X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=67c98709521ae5d63707a56d39a2f63b2a010d41;hp=4592ac084ebc56d60a59b83415167bd2f75af146;hb=42de93ac15366d6d20c1b2fbf99b4780e8ac6617;hpb=b638f6b0354ea124dc80e5e38189474d34141e2d diff --git a/src/search.cpp b/src/search.cpp index 4592ac08..67c98709 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1378,13 +1378,17 @@ namespace { if (nullValue >= beta) { + // Do not return unproven mate scores + if (nullValue >= value_mate_in(PLY_MAX)) + nullValue = beta; + if (depth < 6 * OnePly) - return beta; + return nullValue; // Do zugzwang verification search Value v = search(pos, ss, beta, depth-5*OnePly, ply, false, threadID); if (v >= beta) - return beta; + return nullValue; } else { // The null move failed low, which means that we may be faced with // some kind of threat. If the previous move was reduced, check if