}
-// stringify() converts a numeric value of type T to a std::string
-template<typename T>
-static string stringify(const T& v) {
+// An helper to convert an integer value to a std::string
+static string int_to_string(int v) {
std::ostringstream ss;
ss << v;
o["Search Log Filename"] = UCIOption("SearchLog.txt");
o["Book File"] = UCIOption("book.bin");
o["Best Book Move"] = UCIOption(false);
- o["Mobility (Middle Game)"] = UCIOption(115, 0, 200);
- o["Mobility (Endgame)"] = UCIOption(85, 0, 200);
+ 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(135, 0, 200);
- o["Cowardice"] = UCIOption(85, 0, 200);
+ o["Aggressiveness"] = UCIOption(100, 0, 200);
+ o["Cowardice"] = UCIOption(100, 0, 200);
o["Minimum Split Depth"] = UCIOption(4, 4, 7);
o["Maximum Number of Threads per Split Point"] = UCIOption(5, 4, 8);
o["Threads"] = UCIOption(1, 1, MAX_THREADS);
UCIOption& thr = o["Threads"];
UCIOption& msd = o["Minimum Split Depth"];
- thr.defaultValue = thr.currentValue = stringify(cpu_count());
+ thr.defaultValue = thr.currentValue = int_to_string(cpu_count());
if (cpu_count() >= 8)
- msd.defaultValue = msd.currentValue = stringify(7);
+ msd.defaultValue = msd.currentValue = int_to_string(7);
}
{ defaultValue = currentValue = (def ? "true" : "false"); }
UCIOption::UCIOption(int def, int minv, int maxv) : type("spin"), minValue(minv), maxValue(maxv), idx(Options.size())
-{ defaultValue = currentValue = stringify(def); }
+{ defaultValue = currentValue = int_to_string(def); }
/// set_value() updates currentValue of the Option object. Normally it's up to