From: Fabian Fichter Date: Sat, 29 May 2021 21:08:04 +0000 (+0200) Subject: Support lower UCI Elo levels X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f4513589b5082bfce813663e27c6db8616610b45;p=fairystockfish.git Support lower UCI Elo levels Extends UCI_Elo range to support negative Skill Levels also via corresponding UCI_Elo values. --- diff --git a/src/search.cpp b/src/search.cpp index 13c087d..c4a71d2 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -395,8 +395,11 @@ void Thread::search() { // to CCRL Elo (goldfish 1.13 = 2000) and a fit through Ordo derived Elo // for match (TC 60+0.6) results spanning a wide range of k values. PRNG rng(now()); + double shiftedElo = Options["UCI_Elo"] - 1346.6; double floatLevel = Options["UCI_LimitStrength"] ? - std::clamp(std::pow((Options["UCI_Elo"] - 1346.6) / 143.4, 1 / 0.806), 0.0, 20.0) : + std::clamp(shiftedElo > 0 ? std::pow(shiftedElo / 143.4, 1 / 0.806) + : shiftedElo / 143.4 + std::pow(shiftedElo / 500, 5), + -20.0, 20.0) : double(Options["Skill Level"]); int intLevel = int(floatLevel) + ((floatLevel - int(floatLevel)) * 1024 > rng.rand() % 1024 ? 1 : 0); diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 669258c..061422d 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -183,7 +183,7 @@ void init(OptionsMap& o) { o["UCI_Variant"] << Option("chess", variants.get_keys(), on_variant_change); o["UCI_AnalyseMode"] << Option(false); o["UCI_LimitStrength"] << Option(false); - o["UCI_Elo"] << Option(1350, 1350, 2850); + o["UCI_Elo"] << Option(1350, 500, 2850); o["UCI_ShowWDL"] << Option(false); o["SyzygyPath"] << Option("", on_tb_path); o["SyzygyProbeDepth"] << Option(1, 1, 100);