X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=10d491c025e7e9a2383472b812010f9a5dc74839;hb=ee7a68ea5fc07e331df462b10f35dc770e9409c5;hp=39131bd5fc105ed4b98d24e84d1642d65e84688a;hpb=a273b6ef8c899f546cf585ace584a1b498c04144;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 39131bd5..10d491c0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -179,8 +179,6 @@ namespace { void Search::init() { - const bool PV=true; - for (int imp = 0; imp <= 1; ++imp) for (int d = 1; d < 64; ++d) for (int mc = 1; mc < 64; ++mc) @@ -189,12 +187,12 @@ void Search::init() { if (r < 0.80) continue; - Reductions[!PV][imp][d][mc] = int(std::round(r)) * ONE_PLY; - Reductions[PV][imp][d][mc] = std::max(Reductions[!PV][imp][d][mc] - ONE_PLY, DEPTH_ZERO); - + Reductions[NonPV][imp][d][mc] = int(std::round(r)) * ONE_PLY; + Reductions[PV][imp][d][mc] = std::max(Reductions[NonPV][imp][d][mc] - ONE_PLY, DEPTH_ZERO); + // Increase reduction for non-PV nodes when eval is not improving - if (!imp && Reductions[!PV][imp][d][mc] >= 2 * ONE_PLY) - Reductions[!PV][imp][d][mc] += ONE_PLY; + if (!imp && Reductions[NonPV][imp][d][mc] >= 2 * ONE_PLY) + Reductions[NonPV][imp][d][mc] += ONE_PLY; } for (int d = 0; d < 16; ++d) @@ -361,7 +359,8 @@ void MainThread::search() { Thread* bestThread = this; if ( !this->easyMovePlayed && Options["MultiPV"] == 1 - && !Skill(Options["Skill Level"]).enabled()) + && !Skill(Options["Skill Level"]).enabled() + && rootMoves[0].pv[0] != MOVE_NONE) { for (Thread* th : Threads) if ( th->completedDepth > bestThread->completedDepth @@ -1429,8 +1428,8 @@ moves_loop: // When in check search starts from here } - // update_stats() updates killers, history, countermove and countermove - // history when a new quiet best move is found. + // update_stats() updates killers, history, countermove and countermove plus + // follow-up move history when a new quiet best move is found. void update_stats(const Position& pos, Stack* ss, Move move, Depth depth, Move* quiets, int quietsCnt) {