if (doLMR && !captureOrPromotion)
{
- int bonus = stat_bonus(newDepth) / 2;
- if (value <= alpha)
- bonus = -bonus;
+ int bonus = value > alpha ? stat_bonus(newDepth)
+ : -stat_bonus(newDepth);
update_continuation_histories(ss, movedPiece, to_sq(move), bonus);
}