mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-26 20:16:14 +08:00
Fix incorrect assert(PvNode == (alpha != beta - 1))
In case of a PvNode could happen that alpha == beta - 1, for instance in case the same previous node was visited with same beta during a non-pv search, the node failed low and stored beta-1 in TT. Then the node is searched again in PV mode, TT value beta-1 is retrieved and updates alpha that now happens to be beta-1. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -544,7 +544,7 @@ namespace {
|
||||
const bool RootNode = (NT == Root || NT == SplitPointRoot);
|
||||
|
||||
assert(alpha >= -VALUE_INFINITE && alpha < beta && beta <= VALUE_INFINITE);
|
||||
assert(PvNode == (alpha != beta - 1));
|
||||
assert((alpha == beta - 1) || PvNode);
|
||||
assert(depth > DEPTH_ZERO);
|
||||
assert(pos.thread() >= 0 && pos.thread() < Threads.size());
|
||||
|
||||
@@ -1154,7 +1154,7 @@ split_point_start: // At split points actual search starts from here
|
||||
|
||||
assert(NT == PV || NT == NonPV);
|
||||
assert(alpha >= -VALUE_INFINITE && alpha < beta && beta <= VALUE_INFINITE);
|
||||
assert(PvNode == (alpha != beta - 1));
|
||||
assert((alpha == beta - 1) || PvNode);
|
||||
assert(depth <= DEPTH_ZERO);
|
||||
assert(pos.thread() >= 0 && pos.thread() < Threads.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user