1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-12 20:19:15 +00:00

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.
This commit is contained in:
Marco Costalba 2018-07-28 10:38:36 +02:00 committed by Stéphane Nicolet
parent 9afa03b80e
commit fae57273b2

View file

@ -935,7 +935,7 @@ moves_loop: // When in check, search starts from here
int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO) / ONE_PLY;
// Countermoves based pruning (~20 Elo)
if ( lmrDepth <= ((ss-1)->statScore > 0 ? 3 : 2)
if ( lmrDepth < 3 + ((ss-1)->statScore > 0)
&& (*contHist[0])[movedPiece][to_sq(move)] < CounterMovePruneThreshold
&& (*contHist[1])[movedPiece][to_sq(move)] < CounterMovePruneThreshold)
continue;