From 6e05055f06b301b16a37c3178d9d444cd09dc150 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 8 Dec 2011 13:48:18 +0100 Subject: [PATCH] Set captureThreshold according to static evaluation Consider negative captures as good if still enough to reach beta. After 7502 games: Mod vs Orig 1225 - 1158 - 5119 ELO +3 (+- 4.5) Signed-off-by: Marco Costalba --- src/movepick.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/movepick.cpp b/src/movepick.cpp index 0b3b6fd6..589c27b3 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -88,11 +88,14 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h, killers[0].move = ss->killers[0]; killers[1].move = ss->killers[1]; - // Consider sligtly negative captures as good if at low - // depth and far from beta. + // Consider sligtly negative captures as good if at low depth and far from beta if (ss && ss->eval < beta - PawnValueMidgame && d < 3 * ONE_PLY) captureThreshold = -PawnValueMidgame; + // Consider negative captures as good if still enough to reach beta + else if (ss && ss->eval > beta) + captureThreshold = beta - ss->eval; + phasePtr = MainSearchTable; } -- 2.39.2