Simplify NMP condition

As this is tried only for cutNode, and all children of cutNodes will be nonCutNodes, the guard condition is redundant.
Simplification just removes the unnecessary condition (always true).

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

No functional change
This commit is contained in:
Styx
2025-07-28 20:11:40 +02:00
committed by Joost VandeVondele
parent 1d8f118c3e
commit ab83d320b8
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -856,10 +856,11 @@ Value Search::Worker::search(
}
// Step 9. Null move search with verification search
if (cutNode && (ss - 1)->currentMove != Move::null()
&& ss->staticEval >= beta - 19 * depth + 403 && !excludedMove && pos.non_pawn_material(us)
&& ss->ply >= nmpMinPly && !is_loss(beta))
if (cutNode && ss->staticEval >= beta - 19 * depth + 403 && !excludedMove
&& pos.non_pawn_material(us) && ss->ply >= nmpMinPly && !is_loss(beta))
{
assert((ss - 1)->currentMove != Move::null());
// Null move dynamic reduction based on depth
Depth R = 7 + depth / 3;