X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=af0946ea577722b5f3aaab25fb5f176bae8dc094;hp=1a516ff80b1e7a1c7a95d9d1ac9c9cfd8412e167;hb=9953bfff621b287f5e08139f51d6663c2620db1e;hpb=a03e98dcd33c91c47e4a06282bfb582e582671b7 diff --git a/src/search.cpp b/src/search.cpp index 1a516ff8..af0946ea 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -160,7 +160,7 @@ void Search::init() { Reductions[PV][imp][d][mc] = std::max(Reductions[NonPV][imp][d][mc] - 1, 0); // Increase reduction for non-PV nodes when eval is not improving - if (!imp && Reductions[NonPV][imp][d][mc] >= 2) + if (!imp && r > 1.0) Reductions[NonPV][imp][d][mc]++; } @@ -343,14 +343,15 @@ void Thread::search() { // Reset aspiration window starting size if (rootDepth >= 5 * ONE_PLY) { + Value previousScore = rootMoves[PVIdx].previousScore; delta = Value(18); - alpha = std::max(rootMoves[PVIdx].previousScore - delta,-VALUE_INFINITE); - beta = std::min(rootMoves[PVIdx].previousScore + delta, VALUE_INFINITE); + alpha = std::max(previousScore - delta,-VALUE_INFINITE); + beta = std::min(previousScore + delta, VALUE_INFINITE); ct = Options["Contempt"] * PawnValueEg / 100; // From centipawns - // Adjust contempt based on current bestValue (dynamic contempt) - ct += int(std::round(48 * atan(float(bestValue) / 128))); + // Adjust contempt based on root move's previousScore (dynamic contempt) + ct += int(std::round(48 * atan(float(previousScore) / 128))); Eval::Contempt = (us == WHITE ? make_score(ct, ct / 2) : -make_score(ct, ct / 2));