mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00: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:
parent
ec9b037e5f
commit
04ac1bcabe
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue