mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Update comment on why we call root search with ss+1
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
b9f8cb7837
commit
cd27ed9a74
1 changed files with 4 additions and 2 deletions
|
@ -560,7 +560,8 @@ namespace {
|
||||||
// Start with a small aspiration window and, in case of fail high/low,
|
// Start with a small aspiration window and, in case of fail high/low,
|
||||||
// research with bigger window until not failing high/low anymore.
|
// research with bigger window until not failing high/low anymore.
|
||||||
do {
|
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);
|
value = search<Root>(pos, ss+1, alpha, beta, depth * ONE_PLY);
|
||||||
|
|
||||||
// It is critical that sorting is done with a stable algorithm
|
// It is critical that sorting is done with a stable algorithm
|
||||||
|
@ -1170,7 +1171,6 @@ split_point_start: // At split points actual search starts from here
|
||||||
alpha = sp->alpha;
|
alpha = sp->alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Finished searching the move. If StopRequest is true, the search
|
// Finished searching the move. If StopRequest is true, the search
|
||||||
// was aborted because the user interrupted the search or because we
|
// 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
|
// ran out of time. In this case, the return value of the search cannot
|
||||||
|
@ -2211,6 +2211,8 @@ void ThreadsManager::idle_loop(int threadID, SplitPoint* sp) {
|
||||||
search<SplitPointPV>(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)
|
else if (tsp->nodeType == NonPV)
|
||||||
search<SplitPointNonPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
|
search<SplitPointNonPV>(pos, ss+1, tsp->alpha, tsp->beta, tsp->depth);
|
||||||
|
else
|
||||||
|
assert(false);
|
||||||
|
|
||||||
assert(threads[threadID].state == Thread::SEARCHING);
|
assert(threads[threadID].state == Thread::SEARCHING);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue