Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,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
Expand Down Expand Up @@ -875,6 +875,12 @@ namespace {
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;

Expand Down
2 changes: 1 addition & 1 deletion src/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Thread {

Pawns::Table pawnsTable;
Material::Table materialTable;
size_t pvIdx, pvLast;
size_t pvIdx, multiPV, pvLast;
int selDepth, nmpMinPly;
Color nmpColor;
std::atomic<uint64_t> nodes, tbHits, bestMoveChanges;
Expand Down