Do not modify alpha in split()

When calling split or we immediately return because unable to
find available slaves, or we start searching on _all_ the moves
of the node or until a cut-off occurs, so that when returning
from split we immediately leave the moves loop.

Because of this we don't need to change alpha inside split() and
we can use a signature similar to search() so to better clarify
that split() is actually a search on the remaining node's moves.

No functional change with faked split.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-08-07 09:24:40 +01:00
parent 9a542d9698
commit 5b35c149e8
3 changed files with 20 additions and 22 deletions

View File

@@ -1228,8 +1228,8 @@ split_point_start: // At split points actual search starts from here
&& Threads.available_slave_exists(pos.thread())
&& !StopRequest
&& !thread.cutoff_occurred())
Threads.split<FakeSplit>(pos, ss, &alpha, beta, &bestValue, depth,
threatMove, moveCount, &mp, NT);
bestValue = Threads.split<FakeSplit>(pos, ss, alpha, beta, bestValue, depth,
threatMove, moveCount, &mp, NT);
}
// Step 20. Check for mate and stalemate