X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=3ee823e57d38cb7d9bfe9af2736b7e352696c6bf;hp=6e727954e68095a6896a03ac3fc5f1fbc2a4db74;hb=dba072c449061654201c606dc198d0dcae50e567;hpb=e2e249eabd2493e2bb9e5e017aafaac074a706ef diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 6e727954..3ee823e5 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -106,8 +106,8 @@ namespace { o["Mate Threat Bonus"] = Option(3, 0, 8); o["Check Extension (PV nodes)"] = Option(2, 0, 2); o["Check Extension (non-PV nodes)"] = Option(1, 0, 2); - o["Single Reply Extension (PV nodes)"] = Option(2, 0, 2); - o["Single Reply Extension (non-PV nodes)"] = Option(2, 0, 2); + o["Single Evasion Extension (PV nodes)"] = Option(2, 0, 2); + o["Single Evasion Extension (non-PV nodes)"] = Option(2, 0, 2); o["Mate Threat Extension (PV nodes)"] = Option(0, 0, 2); o["Mate Threat Extension (non-PV nodes)"] = Option(0, 0, 2); o["Pawn Push to 7th Extension (PV nodes)"] = Option(1, 0, 2); @@ -122,9 +122,10 @@ namespace { o["Randomness"] = Option(0, 0, 10); 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, 8); - o["Hash"] = Option(32, 4, 4096); + o["Threads"] = Option(1, 1, THREAD_MAX); + o["Hash"] = Option(32, 4, 2048); o["Clear Hash"] = Option(false, BUTTON); + o["New Game"] = Option(false, BUTTON); o["Ponder"] = Option(true); o["OwnBook"] = Option(true); o["MultiPV"] = Option(1, 1, 500); @@ -169,6 +170,18 @@ namespace { return ret; } + // Specialization for std::string where instruction 'ss >> ret;' + // would erroneusly tokenize a string with spaces. + + template<> + string get_option_value(const string& optionName) { + + if (options.find(optionName) == options.end()) + return string(); + + return options[optionName].currentValue; + } + } //// @@ -210,7 +223,7 @@ void print_uci_options() { for (Options::const_iterator it = options.begin(); it != options.end(); ++it) vec.push_back(it->second); - std::stable_sort(vec.begin(), vec.end()); + std::sort(vec.begin(), vec.end()); for (std::vector