Simplify NMP eval in qsearch

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/6834e9436ec7634154f9cd6e
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 24864 W: 6626 L: 6394 D: 11844
Ptnml(0-2): 62, 2806, 6477, 3012, 75

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/683598fd6ec7634154f9ce82
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 200148 W: 51461 L: 51424 D: 97263
Ptnml(0-2): 92, 21672, 56503, 21721, 86

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

Bench: 2316591
This commit is contained in:
Nonlinear2
2025-05-31 15:43:19 +02:00
committed by Joost VandeVondele
parent 5695486db9
commit 8da3c2155a

View File

@@ -1589,9 +1589,8 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta)
} }
else else
{ {
// In case of null move search, use previous static eval with opposite sign unadjustedStaticEval = evaluate(pos);
unadjustedStaticEval =
(ss - 1)->currentMove != Move::null() ? evaluate(pos) : -(ss - 1)->staticEval;
ss->staticEval = bestValue = ss->staticEval = bestValue =
to_corrected_static_eval(unadjustedStaticEval, correctionValue); to_corrected_static_eval(unadjustedStaticEval, correctionValue);
} }