Leave at 1 for best performance.
* #### Skill Level
- Lower the Skill Level in order to make Stockfish play weaker.
+ Lower the Skill Level in order to make Stockfish play weaker (see also UCI_LimitStrength).
+ Internally, MultiPV is enabled, and with a certain probability depending on the Skill Level a
+ weaker move will be played.
+
+ * #### UCI_LimitStrength
+ Enable weaker play aiming for an Elo rating as set by UCI_Elo. This option overrides Skill Level.
+
+ * #### UCI_Elo
+ If enabled by UCI_LimitStrength, aim for an engine strength of the given Elo.
+ This Elo rating has been calibrated at a time control of 60s+0.6s and anchored to CCRL 40/4.
* #### Move Overhead
Assume a time delay of x ms due to network and GUI overheads. This is useful to
// Check if there are threads with a better score than main thread
if ( Options["MultiPV"] == 1
&& !Limits.depth
- && !Skill(Options["Skill Level"]).enabled()
+ && !(Skill(Options["Skill Level"]).enabled() || Options["UCI_LimitStrength"])
&& rootMoves[0].pv[0] != MOVE_NONE)
{
std::map<Move, int64_t> votes;
beta = VALUE_INFINITE;
multiPV = Options["MultiPV"];
+
// Pick integer skill levels, but non-deterministically round up or down
// such that the average integer skill corresponds to the input floating point one.
+ // UCI_Elo is converted to a suitable fractional skill level, using anchoring
+ // 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());
- int intLevel = int(Options["Skill Level"]) +
- ((Options["Skill Level"] - int(Options["Skill Level"])) * 1024 > rng.rand<unsigned>() % 1024 ? 1 : 0);
+ double floatLevel = Options["UCI_LimitStrength"] ?
+ clamp(std::pow((Options["UCI_Elo"] - 1346.6) / 143.4, 1 / 0.806), 0.0, 20.0) :
+ double(Options["Skill Level"]);
+ int intLevel = int(floatLevel) +
+ ((floatLevel - int(floatLevel)) * 1024 > rng.rand<unsigned>() % 1024 ? 1 : 0);
Skill skill(intLevel);
// When playing with strength handicap enable MultiPV search that we will
o["nodestime"] << Option(0, 0, 10000);
o["UCI_Chess960"] << Option(false);
o["UCI_AnalyseMode"] << Option(false);
+ o["UCI_LimitStrength"] << Option(false);
+ o["UCI_Elo"] << Option(1350, 1350, 2850);
o["SyzygyPath"] << Option("<empty>", on_tb_path);
o["SyzygyProbeDepth"] << Option(1, 1, 100);
o["Syzygy50MoveRule"] << Option(true);