for (int d = 1; d < 64; ++d)
for (int mc = 1; mc < 64; ++mc)
{
- double slope = d > 2 ? 0.88 * d + 0.36 : d;
- double r = log(slope) * log(mc) / 1.95;
+ double r = log(d) * log(mc) / 1.95;
Reductions[NonPV][imp][d][mc] = int(std::round(r));
Reductions[PV][imp][d][mc] = std::max(Reductions[NonPV][imp][d][mc] - 1, 0);
int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO) / ONE_PLY;
// Countermoves based pruning (~20 Elo)
- if ( lmrDepth < 3
+ if ( lmrDepth < 4
+ && (lmrDepth < 3 || ((ss - 1)->statScore > 0 && !PvNode))
&& (*contHist[0])[movedPiece][to_sq(move)] < CounterMovePruneThreshold
&& (*contHist[1])[movedPiece][to_sq(move)] < CounterMovePruneThreshold)
continue;