X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=7123915933b90f59d48627cd95d42dc809b07a38;hp=d0db1c76dd22967a1215b9b6bffd54511816da6b;hb=HEAD;hpb=a105978bbde04508389abad03bd121f817f91646 diff --git a/src/ucioption.cpp b/src/ucioption.cpp index d0db1c76..2c840848 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -35,12 +35,14 @@ #include "tt.h" #include "types.h" #include "uci.h" +#include "hashprobe.h" using std::string; namespace Stockfish { UCI::OptionsMap Options; // Global object +std::unique_ptr hash_probe_thread; namespace UCI { @@ -50,7 +52,15 @@ static void on_hash_size(const Option& o) { TT.resize(size_t(o)); } static void on_logger(const Option& o) { start_logger(o); } static void on_threads(const Option& o) { Threads.set(size_t(o)); } static void on_tb_path(const Option& o) { Tablebases::init(o); } -static void on_eval_file(const Option&) { Eval::NNUE::init(); } +static void on_use_NNUE(const Option& ) { Eval::NNUE::init(); } +static void on_eval_file(const Option& ) { Eval::NNUE::init(); } +static 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 { @@ -73,10 +83,8 @@ void init(OptionsMap& o) { o["MultiPV"] << Option(1, 1, 500); o["Skill Level"] << Option(20, 0, 20); o["Move Overhead"] << Option(10, 0, 5000); - o["Slow Mover"] << Option(100, 10, 1000); o["nodestime"] << Option(0, 0, 10000); o["UCI_Chess960"] << Option(false); - o["UCI_AnalyseMode"] << Option(false); o["UCI_LimitStrength"] << Option(false); o["UCI_Elo"] << Option(1320, 1320, 3190); o["UCI_ShowWDL"] << Option(false); @@ -85,6 +93,7 @@ void init(OptionsMap& o) { o["Syzygy50MoveRule"] << Option(true); o["SyzygyProbeLimit"] << Option(7, 0, 7); o["EvalFile"] << Option(EvalFileDefaultName, on_eval_file); + o["RPCServerAddress"] << Option("", on_rpc_server_address); }