- int d = updated ? depth : depth - 1;
- Value v = updated ? RootMoves[i].score : RootMoves[i].prevScore;
-
- if (s.rdbuf()->in_avail()) // Not at first line
- s << "\n";
-
- s << "info depth " << d
- << " seldepth " << selDepth
- << " score " << (i == PVIdx ? score_to_uci(v, alpha, beta) : score_to_uci(v))
- << " nodes " << pos.nodes_searched()
- << " nps " << pos.nodes_searched() * 1000 / elapsed
- << " time " << elapsed
- << " multipv " << i + 1
- << " pv";
-
- for (size_t j = 0; RootMoves[i].pv[j] != MOVE_NONE; ++j)
- s << " " << move_to_uci(RootMoves[i].pv[j], pos.is_chess960());
- }
-
- return s.str();
- }
-
-} // namespace
-
-
-/// RootMove::extract_pv_from_tt() builds a PV by adding moves from the TT table.
-/// We consider also failing high nodes and not only BOUND_EXACT nodes so to
-/// allow to always have a ponder move even when we fail high at root, and a
-/// long PV to print that is important for position analysis.
-
-void RootMove::extract_pv_from_tt(Position& pos) {
+ Depth d = updated ? depth : depth - ONE_PLY;
+ Value v = updated ? RootMoves[i].score : RootMoves[i].previousScore;