From 5d94305af3f30d736323883124741f2bcdf98ad9 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 28 Dec 2008 19:38:44 +0100 Subject: [PATCH] Properly handle odd depths in razor formula A little bit more aggressive, but should be more in line with the depths logic. Signed-off-by: Marco Costalba --- src/search.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 39dcf976..15ebbad0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1242,14 +1242,14 @@ namespace { else if ( !value_is_mate(beta) && approximateEval < beta - RazorMargin && depth < RazorDepth - && (RazorAtDepthOne || depth > OnePly) + && (RazorAtDepthOne || depth >= 2*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 - RazorMargin / 4) - || (depth <= 2*OnePly && v < beta - RazorMargin) - || (depth <= OnePly && v < beta - RazorMargin / 2)) + || (depth < 3*OnePly && v < beta - RazorMargin) + || (depth < 2*OnePly && v < beta - RazorMargin / 2)) return v; } -- 2.39.2