]> git.sesse.net Git - stockfish/commitdiff
Adjust aspiration window with eval
authorAlayan <alayan.feh@gmail.com>
Mon, 7 Oct 2019 17:02:33 +0000 (19:02 +0200)
committerStéphane Nicolet <cassio@free.fr>
Mon, 7 Oct 2019 20:30:04 +0000 (22:30 +0200)
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
src/search.cpp

diff --git a/AUTHORS b/AUTHORS
index aff6a6c93c86fe4cdfb698675779038e183f903a..8317f545a2dfebb8233d4f9ec04514da9f274b70 100644 (file)
--- 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)
index 6cf999380b6001e9069dcd154a812cc6e4827d3d..1742c6766aa3d65adf0616151fc669e1fac9632f 100644 (file)
@@ -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);