mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Fix futility pruning bug
PredictedDepth can be negative, causing the futility_margin to be negative. It will be very difficult to tweak moveCount pruning and reduction formula, as they are tuned to prevent this behavior. No functional change Resolves #587
This commit is contained in:
parent
56dd58e6f9
commit
744ed85a4d
1 changed files with 1 additions and 1 deletions
|
@ -969,7 +969,7 @@ moves_loop: // When in check search starts from here
|
|||
&& cmh[pos.moved_piece(move)][to_sq(move)] < VALUE_ZERO)
|
||||
continue;
|
||||
|
||||
predictedDepth = newDepth - reduction<PvNode>(improving, depth, moveCount);
|
||||
predictedDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO);
|
||||
|
||||
// Futility pruning: parent node
|
||||
if (predictedDepth < 7 * ONE_PLY)
|
||||
|
|
Loading…
Add table
Reference in a new issue