-/// OptionsMap c'tor initializes the UCI options to their hard coded default
-/// values and initializes the default value of "Threads" and "Minimum Split Depth"
-/// parameters according to the number of CPU cores.
-
-OptionsMap::OptionsMap() {
-
- OptionsMap& o = *this;
-
- o["Use Search Log"] = Option(false);
- o["Search Log Filename"] = Option("SearchLog.txt");
- o["Book File"] = Option("book.bin");
- o["Best Book Move"] = Option(false);
- o["Mobility (Middle Game)"] = Option(100, 0, 200);
- o["Mobility (Endgame)"] = Option(100, 0, 200);
- o["Pawn Structure (Middle Game)"] = Option(100, 0, 200);
- o["Pawn Structure (Endgame)"] = Option(100, 0, 200);
- o["Passed Pawns (Middle Game)"] = Option(100, 0, 200);
- o["Passed Pawns (Endgame)"] = Option(100, 0, 200);
- o["Space"] = Option(100, 0, 200);
- o["Aggressiveness"] = Option(100, 0, 200);
- o["Cowardice"] = Option(100, 0, 200);
- o["Minimum Split Depth"] = Option(4, 4, 7);
- o["Maximum Number of Threads per Split Point"] = Option(5, 4, 8);
- o["Threads"] = Option(1, 1, MAX_THREADS);
- o["Use Sleeping Threads"] = Option(true);
- o["Hash"] = Option(32, 4, 8192);
- o["Clear Hash"] = Option(false, "button");
- o["Ponder"] = Option(true);
- o["OwnBook"] = Option(true);
- o["MultiPV"] = Option(1, 1, 500);
- o["Skill level"] = Option(20, 0, 20);
- o["Emergency Move Horizon"] = Option(40, 0, 50);
- o["Emergency Base Time"] = Option(200, 0, 30000);
- o["Emergency Move Time"] = Option(70, 0, 5000);
- o["Minimum Thinking Time"] = Option(20, 0, 5000);
- o["UCI_Chess960"] = Option(false);
- o["UCI_AnalyseMode"] = Option(false);
-
- // Set some SMP parameters accordingly to the detected CPU count
- Option& thr = o["Threads"];
- Option& msd = o["Minimum Split Depth"];
-
- thr.defaultValue = thr.currentValue = stringify(cpu_count());
-
- if (cpu_count() >= 8)
- msd.defaultValue = msd.currentValue = stringify(7);
+/// 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);