Skip to content

Commit fae5727

Browse files
mcostalbasnicolet
authored andcommitted
Small tweaks to recent code changes
As a note, current 2 LMR conditions on stat score could be simplified in a single line: r -= ((ss->statScore >= 0) - ((ss-1)->statScore >= 0)) * ONE_PLY; We keep them splitted in 2 "if" statements because are easier to (immediately) read. No functional change.
1 parent 9afa03b commit fae5727

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/search.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ namespace {
935935
int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO) / ONE_PLY;
936936

937937
// Countermoves based pruning (~20 Elo)
938-
if ( lmrDepth <= ((ss-1)->statScore > 0 ? 3 : 2)
938+
if ( lmrDepth < 3 + ((ss-1)->statScore > 0)
939939
&& (*contHist[0])[movedPiece][to_sq(move)] < CounterMovePruneThreshold
940940
&& (*contHist[1])[movedPiece][to_sq(move)] < CounterMovePruneThreshold)
941941
continue;

0 commit comments

Comments
 (0)