From: Marco Costalba Date: Wed, 12 Feb 2014 13:16:21 +0000 (+0100) Subject: Revert "Retire null search verification" X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=b534176d4acc15ca5d7fdf3f44d1afb4e33c899a Revert "Retire null search verification" Although does not change ELO level, it seems verification is useful in many zugzwang positions as reported by many sources. So revert this simplification. bench: 8430785 --- diff --git a/src/search.cpp b/src/search.cpp index 097faf90..7188925c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -640,8 +640,24 @@ namespace { (ss+1)->skipNullMove = false; pos.undo_null_move(); - if (nullValue >= beta) // Do not return unproven mate scores - return nullValue >= VALUE_MATE_IN_MAX_PLY ? beta : nullValue; + if (nullValue >= beta) + { + // Do not return unproven mate scores + if (nullValue >= VALUE_MATE_IN_MAX_PLY) + nullValue = beta; + + if (depth < 12 * ONE_PLY) + return nullValue; + + // Do verification search at high depths + ss->skipNullMove = true; + Value v = depth-R < ONE_PLY ? qsearch(pos, ss, beta-1, beta, DEPTH_ZERO) + : search(pos, ss, beta-1, beta, depth-R, false); + ss->skipNullMove = false; + + if (v >= beta) + return nullValue; + } } // Step 9. ProbCut (skipped when in check)