mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Better document fail-high condition
At this point we have already verified (value > alpha) and this implies, in case of a non-PV node, where search window size is zero, that value >= beta. This is not so self-evident, so document the code with an assert condition. No functional change.
This commit is contained in:
parent
239d7b3fd1
commit
942989939a
1 changed files with 3 additions and 1 deletions
|
@ -1003,8 +1003,10 @@ split_point_start: // At split points actual search starts from here
|
|||
alpha = value; // Update alpha here! Always alpha < beta
|
||||
if (SpNode) sp->alpha = value;
|
||||
}
|
||||
else // Fail high
|
||||
else
|
||||
{
|
||||
assert(value >= beta); // Fail high
|
||||
|
||||
if (SpNode) sp->cutoff = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue