From: Marco Costalba Date: Wed, 24 Dec 2008 10:27:07 +0000 (+0100) Subject: Try razoring only for depth > OnePly X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=8cd5cb930dd6737220ed83f787062cac13270298;hp=2feb9d5100038038b371c91562bbf5342a815c39 Try razoring only for depth > OnePly Because razoring verification after qsearch() cuts more then 40% of candidates, do not waste a costly qsearch for nodes at depth one that will be probably discarded anyway by futility. Also tight razoring conditions to keep dangerous false negatives below 0,05%. Still not clear if it is enough. Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 768a22a4..54ff467c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1239,10 +1239,13 @@ namespace { // Null move search not allowed, try razoring else if ( !value_is_mate(beta) && approximateEval < beta - RazorMargin - && depth < RazorDepth) + && depth < RazorDepth + && depth > OnePly + && ttMove == MOVE_NONE + && !pos.has_pawn_on_7th(pos.side_to_move())) { Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID); - if (v < beta - RazorMargin / 2) + if (v < beta - RazorMargin / 2 - int(depth - OnePly) * RazorMargin / 8) return v; }