X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=de4e07fb38a6f37189e5793e899a17f93998a5c6;hp=9b9c20da0019e5b507468cca7f9aa22b3c432954;hb=c14dae1fa20507e3f3c729ee9de6ed55ab11dba6;hpb=f44aea7508d3516c474bce6d95a03b7760391cef diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 9b9c20da..de4e07fb 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -17,6 +17,7 @@ along with this program. If not, see . */ +#include #include #include @@ -28,7 +29,25 @@ using std::string; using std::cout; using std::endl; -OptionsMap Options; +OptionsMap Options; // Global object + + +// Our case insensitive less() function as required by UCI protocol +bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const { + + int c1, c2; + size_t i = 0; + + while (i < s1.size() && i < s2.size()) + { + c1 = tolower(s1[i]); + c2 = tolower(s2[i++]); + + if (c1 != c2) + return c1 < c2; + } + return s1.size() < s2.size(); +} // stringify() converts a numeric value of type T to a std::string @@ -75,7 +94,7 @@ void init_uci_options() { 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["Use Sleeping Master"] = Option(false); + Options["Use Sleeping Threads"] = Option(true); Options["Hash"] = Option(32, 4, 8192); Options["Clear Hash"] = Option(false, "button"); Options["Ponder"] = Option(true); @@ -85,7 +104,7 @@ void init_uci_options() { 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_Chess960"] = Option(false); Options["UCI_AnalyseMode"] = Option(false); // Set some SMP parameters accordingly to the detected CPU count