X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=37fc2ec48a8bfa99b7e4a125f68f540fe1ebaba0;hb=a8de07cc26999e2fef7298a63bfe349aaa4650fa;hp=f682da3ae6e8e9d6c92d709225871c168a3f9464;hpb=4c986b050111e4fb96716a75ae2168c005b03df9;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index f682da3a..37fc2ec4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -292,7 +292,7 @@ void Thread::search() { bestValue = delta = alpha = -VALUE_INFINITE; beta = VALUE_INFINITE; - size_t multiPV = Options["MultiPV"]; + multiPV = Options["MultiPV"]; Skill skill(Options["Skill Level"]); // When playing with strength handicap enable MultiPV search that we will @@ -870,6 +870,12 @@ moves_loop: // When in check, search starts from here sync_cout << "info depth " << depth / ONE_PLY << " currmove " << UCI::move(move, pos.is_chess960()) << " currmovenumber " << moveCount + thisThread->pvIdx << sync_endl; + + // In MultiPV mode also skip moves which will be searched later as PV moves + if (rootNode && std::count(thisThread->rootMoves.begin() + thisThread->pvIdx + 1, + thisThread->rootMoves.begin() + thisThread->multiPV, move)) + continue; + if (PvNode) (ss+1)->pv = nullptr;