mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Remove an unnecessary bound check
When failing high, it is always true that `alpha < beta` and `beta <= bestValue`. Therefore if alpha and bestValue is not in decisive range, it is guaranteed that beta is not. closes https://github.com/official-stockfish/Stockfish/pull/6115 no functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
c9af7674bc
commit
259bdaaa9f
@@ -1412,7 +1412,7 @@ moves_loop: // When in check, search starts here
|
||||
assert(moveCount || !ss->inCheck || excludedMove || !MoveList<LEGAL>(pos).size());
|
||||
|
||||
// Adjust best value for fail high cases
|
||||
if (bestValue >= beta && !is_decisive(bestValue) && !is_decisive(beta) && !is_decisive(alpha))
|
||||
if (bestValue >= beta && !is_decisive(bestValue) && !is_decisive(alpha))
|
||||
bestValue = (bestValue * depth + beta) / (depth + 1);
|
||||
|
||||
if (!moveCount)
|
||||
|
||||
Reference in New Issue
Block a user