-/// init_uci_options() 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.
-
-void init_uci_options() {
-
- Options["Use Search Log"] = Option(false);
- Options["Search Log Filename"] = Option("SearchLog.txt");
- Options["Book File"] = Option("book.bin");
- Options["Best Book Move"] = Option(false);
- Options["Mobility (Middle Game)"] = Option(100, 0, 200);
- Options["Mobility (Endgame)"] = Option(100, 0, 200);
- Options["Pawn Structure (Middle Game)"] = Option(100, 0, 200);
- Options["Pawn Structure (Endgame)"] = Option(100, 0, 200);
- Options["Passed Pawns (Middle Game)"] = Option(100, 0, 200);
- Options["Passed Pawns (Endgame)"] = Option(100, 0, 200);
- Options["Space"] = Option(100, 0, 200);
- Options["Aggressiveness"] = Option(100, 0, 200);
- Options["Cowardice"] = Option(100, 0, 200);
- Options["Check Extension (PV nodes)"] = Option(2, 0, 2);
- Options["Check Extension (non-PV nodes)"] = Option(1, 0, 2);
- Options["Single Evasion Extension (PV nodes)"] = Option(2, 0, 2);
- Options["Single Evasion Extension (non-PV nodes)"] = Option(2, 0, 2);
- Options["Mate Threat Extension (PV nodes)"] = Option(2, 0, 2);
- Options["Mate Threat Extension (non-PV nodes)"] = Option(2, 0, 2);
- Options["Pawn Push to 7th Extension (PV nodes)"] = Option(1, 0, 2);
- Options["Pawn Push to 7th Extension (non-PV nodes)"] = Option(1, 0, 2);
- Options["Passed Pawn Extension (PV nodes)"] = Option(1, 0, 2);
- Options["Passed Pawn Extension (non-PV nodes)"] = Option(0, 0, 2);
- Options["Pawn Endgame Extension (PV nodes)"] = Option(2, 0, 2);
- Options["Pawn Endgame Extension (non-PV nodes)"] = Option(2, 0, 2);
- Options["Minimum Split Depth"] = Option(4, 4, 7);
- Options["Maximum Number of Threads per Split Point"] = Option(5, 4, 8);
- Options["Threads"] = Option(1, 1, MAX_THREADS);
- Options["Hash"] = Option(32, 4, 8192);
- Options["Clear Hash"] = Option(false, "button");
- Options["New Game"] = Option(false, "button");
- Options["Ponder"] = Option(true);
- Options["OwnBook"] = Option(true);
- Options["MultiPV"] = Option(1, 1, 500);
- Options["Emergency Move Horizon"] = Option(40, 0, 50);
- Options["Emergency Base Time"] = Option(200, 0, 60000);
- Options["Emergency Move Time"] = Option(70, 0, 5000);
- Options["Minimum Thinking Time"] = Option(20, 0, 5000);
- Options["UCI_Chess960"] = Option(false); // Just a dummy but needed by GUIs
- Options["UCI_AnalyseMode"] = Option(false);
-
- // Set some SMP parameters accordingly to the detected CPU count
- Option& thr = Options["Threads"];
- Option& msd = Options["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) {
+
+ o["Write Debug Log"] = Option(false, on_logger);
+ o["Write Search Log"] = Option(false);
+ o["Search Log Filename"] = Option("SearchLog.txt");
+ o["Book File"] = Option("book.bin");
+ o["Best Book Move"] = Option(false);
+ o["Contempt Factor"] = Option(0, -50, 50);
+ o["Mobility (Midgame)"] = Option(100, 0, 200, on_eval);
+ o["Mobility (Endgame)"] = Option(100, 0, 200, on_eval);
+ o["Pawn Structure (Midgame)"] = Option(100, 0, 200, on_eval);
+ o["Pawn Structure (Endgame)"] = Option(100, 0, 200, on_eval);
+ o["Passed Pawns (Midgame)"] = Option(100, 0, 200, on_eval);
+ o["Passed Pawns (Endgame)"] = Option(100, 0, 200, on_eval);
+ o["Space"] = Option(100, 0, 200, on_eval);
+ o["Aggressiveness"] = Option(100, 0, 200, on_eval);
+ o["Cowardice"] = Option(100, 0, 200, on_eval);
+ o["Min Split Depth"] = Option(0, 0, 12, on_threads);
+ o["Max Threads per Split Point"] = Option(5, 4, 8, on_threads);
+ o["Threads"] = Option(1, 1, MAX_THREADS, on_threads);
+ o["Idle Threads Sleep"] = Option(true);
+ o["Hash"] = Option(32, 1, 8192, on_hash_size);
+ o["Clear Hash"] = Option(on_clear_hash);
+ o["Ponder"] = Option(true);
+ o["OwnBook"] = Option(false);
+ 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(60, 0, 30000);
+ o["Emergency Move Time"] = Option(30, 0, 5000);
+ o["Minimum Thinking Time"] = Option(20, 0, 5000);
+ o["Slow Mover"] = Option(70, 10, 1000);
+ o["UCI_Chess960"] = Option(false);
+ o["UCI_AnalyseMode"] = Option(false, on_eval);