The classical iterative deepening driver has
(code from Bruce Moreland)
Code: Select all
for (depth = 1;; depth++) {
val = AlphaBeta(depth, -INFINITY, INFINITY);
if (TimedOut())
break;
}
I think you are getting confused with Aspiration Windows, which is implemented like this:
(code from Bruce Moreland)
Code: Select all
#define valWINDOW 50
alpha = -INFINITY;
beta = INFINITY;
for (depth = 1;;) {
val = AlphaBeta(depth, alpha, beta);
if (TimedOut())
break;
if ((val <= alpha) || (val >= beta)) {
alpha = -INFINITY; // We fell outside the window, so try again with a
beta = INFINITY; // full-width window (and the same depth).
continue;
}
alpha = val - valWINDOW; // Set up the window for the next iteration.
beta = val + valWINDOW;
depth++;
}
This allows you to get cut-offs quicker than with an open window, where beta-cutoffs are impossible.
Matthew:out