From 9069193125b753fe8d4c77ca690b5d1b907d848c Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 1 Mar 2011 13:15:13 +0100 Subject: [PATCH] Simplify aspirationDelta update rule After 7522 games: Mod vs Orig 1229 - 1148 - 5145 ELO +3 (+- 4.5) LOS 83% Signed-off-by: Marco Costalba --- src/search.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 3f367d83..d94128eb 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -596,7 +596,7 @@ namespace { SearchStack ss[PLY_MAX_PLUS_2]; Value bestValues[PLY_MAX_PLUS_2]; int bestMoveChanges[PLY_MAX_PLUS_2]; - int depth, researchCountFL, researchCountFH, aspirationDelta; + int depth, aspirationDelta; Value value, alpha, beta; Move bestMove, easyMove; @@ -625,7 +625,7 @@ namespace { // Iterative deepening loop while (++depth <= PLY_MAX && (!MaxDepth || depth <= MaxDepth) && !StopRequest) { - Rml.bestMoveChanges = researchCountFL = researchCountFH = 0; + Rml.bestMoveChanges = 0; cout << "info depth " << depth << endl; // Calculate dynamic aspiration window based on previous iterations @@ -666,16 +666,16 @@ namespace { // otherwise exit the fail high/low loop. if (value >= beta) { - beta = Min(beta + aspirationDelta * (1 << researchCountFH), VALUE_INFINITE); - researchCountFH++; + beta = Min(beta + aspirationDelta, VALUE_INFINITE); + aspirationDelta += aspirationDelta / 2; } else if (value <= alpha) { AspirationFailLow = true; StopOnPonderhit = false; - alpha = Max(alpha - aspirationDelta * (1 << researchCountFL), -VALUE_INFINITE); - researchCountFL++; + alpha = Max(alpha - aspirationDelta, -VALUE_INFINITE); + aspirationDelta += aspirationDelta / 2; } else break; -- 2.39.2