From d4575941974ade5135971b87ff663ef4ff000de9 Mon Sep 17 00:00:00 2001 From: Joona Kiiski Date: Thu, 14 Jan 2010 22:58:38 +0200 Subject: [PATCH] Razor at depth one, but do razoring only when not in check This way razoring is always based on exact evaluation and follows simple formula. Joona's test results are positive: 32-bit 1CPU: Mod - Orig: 1073 - 993 64-bit 4CPU: Mod - Orig: 759 - 721 Functionality Signature: 11448962 Signed-off-by: Marco Costalba --- src/search.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 76db6d69..40808c6a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1447,8 +1447,9 @@ namespace { } // Null move search not allowed, try razoring else if ( !value_is_mate(beta) + && !isCheck && depth < RazorDepth - && staticValue < beta - (depth > OnePly ? NullMoveMargin + 16 * depth : 2*NullMoveMargin) + && staticValue < beta - (NullMoveMargin + 16 * depth) && ss[ply - 1].currentMove != MOVE_NULL && ttMove == MOVE_NONE && !pos.has_pawn_on_7th(pos.side_to_move())) -- 2.39.2