X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fucioption.cpp;h=79a2385a1319b15c62824b2ca6175e1801f73676;hb=4004bcf3a48c47450344e93fcf186e3eb5d32165;hp=788aed17c21ce0b3b066bae8dcc5f0ffe1b6dceb;hpb=84f3e867903f62480c33243dd0ecbffd342796fc;p=stockfish diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 788aed17..79a2385a 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -26,11 +26,13 @@ #include "thread.h" #include "tt.h" #include "uci.h" +#include "hashprobe.h" #include "syzygy/tbprobe.h" using std::string; UCI::OptionsMap Options; // Global object +std::unique_ptr hash_probe_thread; namespace UCI { @@ -42,6 +44,13 @@ void on_threads(const Option& o) { Threads.set(size_t(o)); } void on_tb_path(const Option& o) { Tablebases::init(o); } void on_use_NNUE(const Option& ) { Eval::init_NNUE(); } void on_eval_file(const Option& ) { Eval::init_NNUE(); } +void on_rpc_server_address(const Option& o) { + if (hash_probe_thread) { + hash_probe_thread->Shutdown(); + } + std::string addr = o; + hash_probe_thread.reset(new HashProbeThread(addr)); +} /// Our case insensitive less() function as required by UCI protocol bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const { @@ -79,7 +88,8 @@ void init(OptionsMap& o) { o["Syzygy50MoveRule"] << Option(true); o["SyzygyProbeLimit"] << Option(7, 0, 7); o["Use NNUE"] << Option(false, on_use_NNUE); - o["EvalFile"] << Option("nn-97f742aaefcd.nnue", on_eval_file); + o["EvalFile"] << Option("nn-9931db908a9b.nnue", on_eval_file); + o["RPCServerAddress"] << Option("", on_rpc_server_address); }