// If the bestMove is stable over several iterations, reduce time accordingly
timeReduction = lastBestMoveDepth + 10 * ONE_PLY < completedDepth ? 1.95 : 1.0;
- double reduction = std::pow(mainThread->previousTimeReduction, 0.528) / timeReduction;
+ double reduction = (1.25 + mainThread->previousTimeReduction) / (2.25 * timeReduction);
// Use part of the gained time from a previous stable move for the current move
for (Thread* th : Threads)
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);
}