From 3f3365221b571f1e712f1dd66574a866e858256d Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 1 Dec 2009 11:48:28 +0100 Subject: [PATCH] Try to prune also when approximateEval < beta Now we always try to filter out moves, we will have more wasted evaluation calls, but also more pruned nodes. After 786 games Mod vs Orig +196 =413 -177 +8 ELO Verified also against Rybka it increases score to 50-51% Signed-off-by: Marco Costalba --- src/search.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 4b93a210..5bbc0abd 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1517,19 +1517,16 @@ namespace { continue; // Value based pruning - if (approximateEval < beta) - { - if (futilityValue == VALUE_NONE) - futilityValue = evaluate(pos, ei, threadID) + FutilityValueMargin; + if (futilityValue == VALUE_NONE) + futilityValue = evaluate(pos, ei, threadID) + FutilityValueMargin; - futilityValueScaled = futilityValue - moveCount * IncrementalFutilityMargin; + futilityValueScaled = futilityValue - moveCount * IncrementalFutilityMargin; - if (futilityValueScaled < beta) - { - if (futilityValueScaled > bestValue) - bestValue = futilityValueScaled; - continue; - } + if (futilityValueScaled < beta) + { + if (futilityValueScaled > bestValue) + bestValue = futilityValueScaled; + continue; } } -- 2.39.2