X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=9f1447e19944c42064998321af595af437292471;hp=3ee823e57d38cb7d9bfe9af2736b7e352696c6bf;hb=968c3de8e0acd46a8b55225dda1ed607ce24f380;hpb=5c8f571459fd4812543ead27d3644dcf46a5682d diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 3ee823e5..9f1447e1 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -196,15 +196,18 @@ void init_uci_options() { load_defaults(options); - // Limit the default value of "Threads" to 7 even if we have 8 CPU cores. - // According to Ken Dail's tests, Glaurung plays much better with 7 than - // with 8 threads. This is weird, but it is probably difficult to find out - // why before I have a 8-core computer to experiment with myself. + // Set optimal value for parameter "Minimum Split Depth" + // according to number of available cores. assert(options.find("Threads") != options.end()); assert(options.find("Minimum Split Depth") != options.end()); - options["Threads"].defaultValue = stringify(Min(cpu_count(), 7)); - options["Threads"].currentValue = stringify(Min(cpu_count(), 7)); + 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); }