-/// OptionsMap c'tor initializes the UCI options to their hard coded default
-/// values and initializes the default value of "Threads" and "Min Split Depth"
-/// parameters according to the number of CPU cores detected.
-
-OptionsMap::OptionsMap() {
-
- int cpus = std::min(cpu_count(), MAX_THREADS);
- int msd = cpus < 8 ? 4 : 7;
- OptionsMap& o = *this;
-
- o["Use Search Log"] = UCIOption(false);
- o["Search Log Filename"] = UCIOption("SearchLog.txt");
- o["Book File"] = UCIOption("book.bin");
- o["Best Book Move"] = UCIOption(false);
- o["Mobility (Middle Game)"] = UCIOption(100, 0, 200);
- o["Mobility (Endgame)"] = UCIOption(100, 0, 200);
- o["Passed Pawns (Middle Game)"] = UCIOption(100, 0, 200);
- o["Passed Pawns (Endgame)"] = UCIOption(100, 0, 200);
- o["Space"] = UCIOption(100, 0, 200);
- o["Aggressiveness"] = UCIOption(100, 0, 200);
- o["Cowardice"] = UCIOption(100, 0, 200);
- o["Min Split Depth"] = UCIOption(msd, 4, 7);
- o["Max Threads per Split Point"] = UCIOption(5, 4, 8);
- o["Threads"] = UCIOption(cpus, 1, MAX_THREADS);
- o["Use Sleeping Threads"] = UCIOption(true);
- o["Hash"] = UCIOption(32, 4, 8192);
- o["Clear Hash"] = UCIOption(false, "button");
- o["Ponder"] = UCIOption(true);
- o["OwnBook"] = UCIOption(true);
- o["MultiPV"] = UCIOption(1, 1, 500);
- o["Skill Level"] = UCIOption(20, 0, 20);
- o["Emergency Move Horizon"] = UCIOption(40, 0, 50);
- o["Emergency Base Time"] = UCIOption(200, 0, 30000);
- o["Emergency Move Time"] = UCIOption(70, 0, 5000);
- o["Minimum Thinking Time"] = UCIOption(20, 0, 5000);
- o["UCI_Chess960"] = UCIOption(false);
- o["UCI_AnalyseMode"] = UCIOption(false);
+/// init() initializes the UCI options to their hard-coded default values
+
+void init(OptionsMap& o) {
+
+ // at most 2^32 clusters.
+ constexpr int MaxHashMB = Is64Bit ? 131072 : 2048;
+
+ o["Debug Log File"] << Option("", on_logger);
+ o["Contempt"] << Option(24, -100, 100);
+ o["Analysis Contempt"] << Option("Both var Off var White var Black var Both", "Both");
+ o["Threads"] << Option(1, 1, 512, on_threads);
+ o["Hash"] << Option(16, 1, MaxHashMB, on_hash_size);
+ o["Clear Hash"] << Option(on_clear_hash);
+ o["Ponder"] << Option(false);
+ o["MultiPV"] << Option(1, 1, 500);
+ o["Skill Level"] << Option(20, 0, 20);
+ o["Move Overhead"] << Option(30, 0, 5000);
+ o["Minimum Thinking Time"] << Option(20, 0, 5000);
+ o["Slow Mover"] << Option(84, 10, 1000);
+ o["nodestime"] << Option(0, 0, 10000);
+ o["UCI_Chess960"] << Option(false);
+ o["UCI_AnalyseMode"] << Option(false);
+ o["SyzygyPath"] << Option("<empty>", on_tb_path);
+ o["SyzygyProbeDepth"] << Option(1, 1, 100);
+ o["Syzygy50MoveRule"] << Option(true);
+ o["SyzygyProbeLimit"] << Option(7, 0, 7);