From b534176d4acc15ca5d7fdf3f44d1afb4e33c899a Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 12 Feb 2014 14:16:21 +0100 Subject: [PATCH] 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 --- src/search.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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) -- 2.39.2