Refactor pv printing

Also fix the case which is currently printing depth 0.

fixes #5019
closes https://github.com/official-stockfish/Stockfish/pull/5020

No functional change
This commit is contained in:
Disservin
2024-01-27 22:27:22 +01:00
committed by Joost VandeVondele
parent 13eb023fc0
commit 16afec0582
4 changed files with 66 additions and 79 deletions

View File

@@ -19,7 +19,6 @@
#ifndef UCI_H_INCLUDED
#define UCI_H_INCLUDED
#include <cstdint>
#include <iostream>
#include <string>
#include <unordered_map>
@@ -37,10 +36,6 @@ namespace Eval::NNUE {
enum NetSize : int;
}
namespace Search {
class Worker;
}
class Move;
enum Square : int;
using Value = int;
@@ -55,12 +50,6 @@ class UCI {
static std::string value(Value v);
static std::string square(Square s);
static std::string move(Move m, bool chess960);
static std::string pv(const Search::Worker& workerThread,
TimePoint elapsed,
uint64_t nodesSearched,
uint64_t tb_hits,
int hashfull,
bool rootInTB);
static std::string wdl(Value v, int ply);
static Move to_move(const Position& pos, std::string& str);