We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaea7da commit c54fe2cCopy full SHA for c54fe2c
src/search.cpp
@@ -137,6 +137,7 @@ class Searcher {
137
138
Value alpha = Value::matedIn(0);
139
Value beta = Value::mateIn(0);
140
+ Value window = 50;
141
Value bestEvalRoot = Value::none();
142
Move bestMoveRoot = Move::NO_MOVE;
143
@@ -168,6 +169,24 @@ class Searcher {
168
169
break;
170
}
171
172
+ // Aspiration window
173
+ if (stats.depth >= 3) {
174
+ if (score <= alpha) {
175
+ beta = (alpha + beta) / 2;
176
+ alpha = alpha - window;
177
+ window = window * 2;
178
+ continue;
179
+ }
180
+ if (score >= beta) {
181
+ beta += window;
182
183
184
185
+ window = 50;
186
+ alpha = score - window;
187
+ beta = score + window;
188
189
+
190
stats.depth++;
191
192
0 commit comments