No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
// Start with a small aspiration window and, in case of fail high/low,
// research with bigger window until not failing high/low anymore.
do {
// Start with a small aspiration window and, in case of fail high/low,
// research with bigger window until not failing high/low anymore.
do {
- // Search starting from ss+1 to allow calling update_gains()
+ // Search starting from ss+1 to allow referencing (ss-1). This is
+ // needed by update_gains() and ss copy when splitting at Root.
value = search<Root>(pos, ss+1, alpha, beta, depth * ONE_PLY);
// It is critical that sorting is done with a stable algorithm
value = search<Root>(pos, ss+1, alpha, beta, depth * ONE_PLY);
// It is critical that sorting is done with a stable algorithm
// Finished searching the move. If StopRequest is true, the search
// was aborted because the user interrupted the search or because we
// ran out of time. In this case, the return value of the search cannot
// Finished searching the move. If StopRequest is true, the search
// was aborted because the user interrupted the search or because we
// ran out of time. In this case, the return value of the search cannot
search<SplitPointPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
else if (tsp->nodeType == NonPV)
search<SplitPointNonPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
search<SplitPointPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
else if (tsp->nodeType == NonPV)
search<SplitPointNonPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
assert(threads[threadID].state == Thread::SEARCHING);
assert(threads[threadID].state == Thread::SEARCHING);