Skip to content

Commit

Permalink
Improvde MultiPV - no functional change official-stockfish#2163
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelB7 committed May 29, 2019
2 parents 725185c + 62e6caf commit 1817411
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Makefile
Expand Up @@ -46,7 +46,7 @@ RELEASE = no
RELVERSION =

### Uncomment the line below for Honey, comment out for Stockfish
### VERSION=sullivan
VERSION=sullivan

### Uncomment for use with Raspberry Pi - a slower NPS UCI option setting used in Play
### by Elo and personalities
Expand Down
13 changes: 12 additions & 1 deletion src/search.cpp
Expand Up @@ -541,8 +541,11 @@ ss->pv = pv;
#endif

beta = VALUE_INFINITE;

#ifdef Sullivan //Improve multiPV mode #2163 by Joerg Oster
multiPV = Options["MultiPV"];
#else
size_t multiPV = Options["MultiPV"];
#endif
Skill skill(Options["Skill Level"]);

#ifdef Sullivan //zugzwangMates by Gunther Dementz
Expand Down Expand Up @@ -1415,6 +1418,14 @@ namespace {
sync_cout << "info depth " << depth / ONE_PLY
<< " currmove " << UCI::move(move, pos.is_chess960())
<< " currmovenumber " << moveCount + thisThread->pvIdx << sync_endl;
#ifdef Sullivan // Improve multiPV mode #2163 by Joerg Oster
// In MultiPV mode also skip moves which will be searched later as PV moves
// this section updated by mstembera
if ( rootNode
&& std::find(thisThread->rootMoves.begin() + thisThread->pvIdx, thisThread->rootMoves.begin() + thisThread->pvLast, move)
== thisThread->rootMoves.begin() + thisThread->pvLast)
continue;
#endif
if (PvNode)
(ss+1)->pv = nullptr;

Expand Down
7 changes: 4 additions & 3 deletions src/thread.h
Expand Up @@ -62,12 +62,13 @@ class Thread {

Pawns::Table pawnsTable;
Material::Table materialTable;
size_t pvIdx, pvLast;

#ifdef Sullivan // Gunther Demetz zugzwangSolver
int selDepth, nmpMinPly, zugzwangMates;
#ifdef Sullivan
size_t pvIdx, multiPV, pvLast; // Improve multiPV mode by joergoster
int selDepth, nmpMinPly, zugzwangMates; // Gunther Demetz zugzwangSolver
int64_t visits, allScores; // Moez Jellouli -> Save_probcut #e05dc73
#else
size_t pvIdx, pvLast;
int selDepth, nmpMinPly;
#endif

Expand Down

0 comments on commit 1817411

Please sign in to comment.