1
0
Fork 0
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:
Marco Costalba 2012-11-17 12:44:19 +01:00
parent 239d7b3fd1
commit 942989939a

View file

@ -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;
}