X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=df19108fb2db4dd28642c1ef20b34f49aa5f2a53;hp=ea0c64f1ea01c610e3a11b7744a5e282589fb5f6;hb=650aeaf2420bdac00de03963132d82a415193a1c;hpb=389e60741f308bb23904baec0d52552935162e0f diff --git a/src/search.cpp b/src/search.cpp index ea0c64f1..df19108f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -503,7 +503,7 @@ void Thread::search() { // 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) @@ -1134,9 +1134,8 @@ moves_loop: // When in check, search starts from here 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); }