mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Provide selective search depth info for each pv move
No functional change Closes #1166
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user