From 0150da5c2bd4661996b05dec4a1eca473515e9d7 Mon Sep 17 00:00:00 2001 From: Alayan Date: Mon, 7 Oct 2019 19:02:33 +0200 Subject: [PATCH] Adjust aspiration window with eval This patch changes the base aspiration window size depending on the absolute value of the previous iteration score, increasing it away from zero. This stems from the observation that the further away from zero, the more likely the evaluation is to change significantly with more depth. Conversely, a tighter aspiration window is more efficient when close to zero. A beneficial side-effect is that analysis of won positions without a quick mate is less prone to waste nodes in repeated fail-high that change the eval by tiny steps. STC: LLR: 2.96 (-2.94,2.94) [0.50,4.50] Total: 60102 W: 13327 L: 12868 D: 33907 http://tests.stockfishchess.org/tests/view/5d9a70d40ebc5902b6cf39ba LTC: LLR: 2.95 (-2.94,2.94) [0.00,3.50] Total: 155553 W: 25745 L: 25141 D: 104667 http://tests.stockfishchess.org/tests/view/5d9a7ca30ebc5902b6cf4028 Future work : the values used in this patch were only a reasonable guess. Further testing should unveil more optimal values. However, the aspiration window is rather tight with a minimum of 21 internal units, so discrete integers put a practical limitation to such tweaking. More exotic experiments around the aspiration window parameters could also be tried, but efficient conditions to adjust the base aspiration window size or allow it to not be centered on the current evaluation are not obvious. The aspiration window increases after a fail-high or a fail-low is another avenue to explore for potential enhancements. Bench: 4043748 --- AUTHORS | 2 +- src/search.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index aff6a6c9..8317f545 100644 --- a/AUTHORS +++ b/AUTHORS @@ -9,7 +9,7 @@ Aditya (absimaldata) Adrian Petrescu (apetresc) Ajith Chandy Jose (ajithcj) Alain Savard (Rocky640) -alayan-stk-2 +Alayan Feh (Alayan-stk-2) Alexander Kure Alexander Pagel (Lolligerhans) Ali AlZhrani (Cooffe) diff --git a/src/search.cpp b/src/search.cpp index 6cf99938..1742c676 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -412,7 +412,7 @@ void Thread::search() { if (rootDepth >= 4) { Value previousScore = rootMoves[pvIdx].previousScore; - delta = Value(23); + delta = Value(21 + abs(previousScore) / 128); alpha = std::max(previousScore - delta,-VALUE_INFINITE); beta = std::min(previousScore + delta, VALUE_INFINITE); -- 2.39.2