From 52bca81dcb7a5ac4246f95c4ab29a1f5f66b59a4 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 14 Nov 2009 17:38:22 +0100 Subject: [PATCH] History pruning exponential limit Use an exponenital law instead of a linear one for history pruning. This should prune more at low depths and a bit less at high depths. After 965 games Mod vs Orig +233 =504 -228 +2 ELO Signed-off-by: Marco Costalba --- src/search.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index b420fb90..b5f37cb8 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1388,6 +1388,9 @@ namespace { if (tte && (tte->type() & VALUE_TYPE_EVAL)) futilityValue = value_from_tt(tte->value(), ply) + FutilityMargins[int(depth) - 2]; + // Move count pruning limit + const int MCLimit = 3 + (1 << (3*int(depth)/8)); + // Loop through all legal moves until no moves remain or a beta cutoff // occurs. while ( bestValue < beta @@ -1412,8 +1415,23 @@ namespace { && !captureOrPromotion && move != ttMove) { + //std::cout << std::endl; + //for (int d = 2; d <= 14; d+=2) + // std::cout << d / 2 << ", " << 3+(1 << (3*d/8)) << std::endl; + //std::cout << std::endl; +/* + 3 + (1 << (3*int(depth)/8)) + + 1 * onePly - > moveCount >= 4 + 2 * onePly - > moveCount >= 5 + 3 * onePly - > moveCount >= 7 + 4 * onePly - > moveCount >= 11 + 5 * onePly - > moveCount >= 11 + 6 * onePly - > moveCount >= 19 + 7 * onePly - > moveCount >= 35 +*/ // History pruning. See ok_to_prune() definition - if ( moveCount >= 2 + int(depth) + if ( moveCount >= MCLimit && ok_to_prune(pos, move, ss[ply].threatMove, depth) && bestValue > value_mated_in(PLY_MAX)) continue; -- 2.39.2