Provide selective search depth info for each pv move

No functional change

Closes #1166
This commit is contained in:
joergoster
2017-07-13 16:30:03 -07:00
committed by Joona Kiiski
parent 36a93d90f7
commit 377d77dbe9
4 changed files with 10 additions and 6 deletions

View File

@@ -383,6 +383,9 @@ void Thread::search() {
// MultiPV loop. We perform a full root search for each PV line
for (PVIdx = 0; PVIdx < multiPV && !Threads.stop; ++PVIdx)
{
// Reset UCI info selDepth for each depth and each PV line
selDepth = 0;
// Reset aspiration window starting size
if (rootDepth >= 5 * ONE_PLY)
{
@@ -566,8 +569,8 @@ namespace {
static_cast<MainThread*>(thisThread)->check_time();
// Used to send selDepth info to GUI
if (PvNode && thisThread->maxPly < ss->ply)
thisThread->maxPly = ss->ply;
if (PvNode && thisThread->selDepth < ss->ply)
thisThread->selDepth = ss->ply;
if (!rootNode)
{
@@ -1043,6 +1046,7 @@ moves_loop: // When in check search starts from here
if (moveCount == 1 || value > alpha)
{
rm.score = value;
rm.selDepth = thisThread->selDepth;
rm.pv.resize(1);
assert((ss+1)->pv);
@@ -1525,7 +1529,7 @@ string UCI::pv(const Position& pos, Depth depth, Value alpha, Value beta) {
ss << "info"
<< " depth " << d / ONE_PLY
<< " seldepth " << pos.this_thread()->maxPly
<< " seldepth " << rootMoves[i].selDepth
<< " multipv " << i + 1
<< " score " << UCI::value(v);