mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08: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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user