Skip to content

Commit 92514fd

Browse files
daniel-monroevondele
authored andcommitted
Simplify away a term in see pruning
This change only sets the margin to 0 when depth <= 2 and margin <= 42 which never has a difference, thus non-functional Passed non-regression STC LLR: 3.51 (-2.94,2.94) <-1.75,0.25> Total: 306976 W: 78935 L: 78961 D: 149080 Ptnml(0-2): 630, 34097, 84067, 34057, 637 https://tests.stockfishchess.org/tests/view/68708015fa93cf16d3bb2782 closes #6170 No functional change
1 parent e88ccfd commit 92514fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/search.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,8 @@ Value Search::Worker::search(
10471047
}
10481048

10491049
// SEE based pruning for captures and checks
1050-
int seeHist = std::clamp(captHist / 31, -137 * depth, 125 * depth);
1051-
if (!pos.see_ge(move, -158 * depth - seeHist))
1050+
int margin = std::clamp(158 * depth + captHist / 31, 0, 283 * depth);
1051+
if (!pos.see_ge(move, -margin))
10521052
{
10531053
bool mayStalemateTrap =
10541054
depth > 2 && alpha < 0 && pos.non_pawn_material(us) == PieceValue[movedPiece]

0 commit comments

Comments
 (0)