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

Simplify bestMove promotion

Passed Non-regression STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 216768 W: 56240 L: 56217 D: 104311
Ptnml(0-2): 794, 24900, 56956, 24957, 777
https://tests.stockfishchess.org/tests/view/66bc11324ff211be9d4ee78b

Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 44970 W: 11391 L: 11199 D: 22380
Ptnml(0-2): 44, 4596, 13002, 4810, 33
https://tests.stockfishchess.org/tests/view/66bdbb1b4ff211be9d4eec5a

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

bench: 1613043
This commit is contained in:
Shawn Xu 2024-08-13 19:02:02 -07:00 committed by Joost VandeVondele
parent 5d81071953
commit 175021721c

View file

@ -1274,9 +1274,9 @@ moves_loop: // When in check, search starts here
// In case we have an alternative move equal in eval to the current bestmove,
// promote it to bestmove by pretending it just exceeds alpha (but not beta).
int inc = (value == bestValue && (int(nodes) & 15) == 0
&& ss->ply + 2 + ss->ply / 32 >= thisThread->rootDepth
&& std::abs(value) + 1 < VALUE_TB_WIN_IN_MAX_PLY);
int inc =
(value == bestValue && (int(nodes) & 15) == 0 && ss->ply + 2 >= thisThread->rootDepth
&& std::abs(value) + 1 < VALUE_TB_WIN_IN_MAX_PLY);
if (value + inc > bestValue)
{