value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth + doDeeperSearch, !cutNode);
// If the move passed LMR update its stats
- if (didLMR && !captureOrPromotion)
+ if (didLMR)
{
int bonus = value > alpha ? stat_bonus(newDepth)
: -stat_bonus(newDepth);
+ if (captureOrPromotion)
+ bonus /= 4;
+
update_continuation_histories(ss, movedPiece, to_sq(move), bonus);
}
}