Skip to content

Commit a516b51

Browse files
aronpetkovondele
authored andcommitted
Simplify eval >= beta condition from NMP
It seems that now only checking if static eval is above beta by some margin is all that's necessary. Passed Non-Regression STC LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 227264 W: 58430 L: 58421 D: 110413 Ptnml(0-2): 532, 26559, 59454, 26542, 545 https://tests.stockfishchess.org/tests/view/68763a77432ca24f6388c766 Passed Non-Regression LTC LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 72048 W: 18622 L: 18455 D: 34971 Ptnml(0-2): 26, 7775, 20272, 7908, 43 https://tests.stockfishchess.org/tests/view/687c9f2b6e17e7fa3939b0c5 closes #6175 Bench: 2759840
1 parent 92514fd commit a516b51

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Andy Duplain
3131
Antoine Champion (antoinechampion)
3232
Aram Tumanian (atumanian)
3333
Arjun Temurnikar
34+
Aron Petkovski (fury)
3435
Artem Solopiy (EntityFX)
3536
Auguste Pop
3637
Balazs Szilagyi

src/search.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -848,12 +848,10 @@ Value Search::Worker::search(
848848
}
849849

850850
// Step 9. Null move search with verification search
851-
if (cutNode && (ss - 1)->currentMove != Move::null() && eval >= beta
851+
if (cutNode && (ss - 1)->currentMove != Move::null()
852852
&& ss->staticEval >= beta - 19 * depth + 389 && !excludedMove && pos.non_pawn_material(us)
853853
&& ss->ply >= nmpMinPly && !is_loss(beta))
854854
{
855-
assert(eval - beta >= 0);
856-
857855
// Null move dynamic reduction based on depth
858856
Depth R = 7 + depth / 3;
859857

0 commit comments

Comments
 (0)