Add improving to a condition of NMP

This patch makes one of the conditions for null-move pruning depend on whether we're improving. Keep in mind that it relies on the "classical" definiton, rather than the refined one.

Passed STC: https://tests.stockfishchess.org/tests/view/678d5267d63764e34db49720
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 38976 W: 10296 L: 9974 D: 18706
Ptnml(0-2): 135, 4504, 9902, 4798, 149

Passed LTC: https://tests.stockfishchess.org/tests/view/678d5891d63764e34db49731
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 275772 W: 70655 L: 69836 D: 135281
Ptnml(0-2): 217, 30615, 75394, 31452, 208

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

Bench: 2475787
This commit is contained in:
pkrisz99
2025-01-18 23:58:25 +01:00
committed by Joost VandeVondele
parent d606311e55
commit 75b75bc16a
2 changed files with 5 additions and 4 deletions

View File

@@ -129,6 +129,7 @@ Kian E (KJE-98)
kinderchocolate kinderchocolate
Kiran Panditrao (Krgp) Kiran Panditrao (Krgp)
Kojirion Kojirion
Krisztián Peőcz
Krystian Kuzniarek (kuzkry) Krystian Kuzniarek (kuzkry)
Leonardo Ljubičić (ICCF World Champion) Leonardo Ljubičić (ICCF World Champion)
Leonid Pechenik (lp--) Leonid Pechenik (lp--)

View File

@@ -803,12 +803,10 @@ Value Search::Worker::search(
&& eval >= beta && (!ttData.move || ttCapture) && !is_loss(beta) && !is_win(eval)) && eval >= beta && (!ttData.move || ttCapture) && !is_loss(beta) && !is_win(eval))
return beta + (eval - beta) / 3; return beta + (eval - beta) / 3;
improving |= ss->staticEval >= beta + 97;
// Step 9. Null move search with verification search // Step 9. Null move search with verification search
if (cutNode && (ss - 1)->currentMove != Move::null() && eval >= beta if (cutNode && (ss - 1)->currentMove != Move::null() && eval >= beta
&& ss->staticEval >= beta - 20 * depth + 440 && !excludedMove && pos.non_pawn_material(us) && ss->staticEval >= beta - 20 * depth + 470 - 60 * improving && !excludedMove
&& ss->ply >= thisThread->nmpMinPly && !is_loss(beta)) && pos.non_pawn_material(us) && ss->ply >= thisThread->nmpMinPly && !is_loss(beta))
{ {
assert(eval - beta >= 0); assert(eval - beta >= 0);
@@ -846,6 +844,8 @@ Value Search::Worker::search(
} }
} }
improving |= ss->staticEval >= beta + 97;
// Step 10. Internal iterative reductions // Step 10. Internal iterative reductions
// For PV nodes without a ttMove as well as for deep enough cutNodes, we decrease depth. // For PV nodes without a ttMove as well as for deep enough cutNodes, we decrease depth.
// (* Scaler) Especially if they make IIR more aggressive. // (* Scaler) Especially if they make IIR more aggressive.