1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Fix TB guard

even if beta is below TB range, once we return probcutBeta with beta + 390 we
can return wrong TB value, and guard against ttData.value being `VALUE_NONE`

closes https://github.com/official-stockfish/Stockfish/pull/5499

bench: 1440277
This commit is contained in:
Shahin M. Shahin 2024-07-19 13:27:30 +03:00 committed by Joost VandeVondele
parent 986173264f
commit bb4b01e306

View file

@ -894,7 +894,8 @@ moves_loop: // When in check, search starts here
// Step 12. A small Probcut idea (~4 Elo)
probCutBeta = beta + 390;
if ((ttData.bound & BOUND_LOWER) && ttData.depth >= depth - 4 && ttData.value >= probCutBeta
&& std::abs(beta) < VALUE_TB_WIN_IN_MAX_PLY)
&& std::abs(beta) < VALUE_TB_WIN_IN_MAX_PLY
&& std::abs(ttData.value) < VALUE_TB_WIN_IN_MAX_PLY)
return probCutBeta;
const PieceToHistory* contHist[] = {(ss - 1)->continuationHistory,