Initial work towards adjustable playing strength.

Added the UCI_LimitStrength and the UCI_Elo options, with an Elo
range of 2100-2900. When UCI_LimitStrength is enabled, the number
of threads is set to 1, and the search speed is slowed down according
to the chosen Elo level.

Todo:

1. Implement Elo levels below 2100 by blundering on purpose and/or
   crippling the evaluation.
2. Automatically calibrate the maximum Elo by measuring the CPU speed
   during program initialization, perhaps by doing some bitboard
   computations and measuring the time taken.

No functional change when UCI_LimitStrength is false (the default).
This commit is contained in:
Tord Romstad
2009-08-04 11:31:25 +02:00
parent dad632ce5b
commit a1096e55cf
2 changed files with 61 additions and 7 deletions

View File

@@ -131,6 +131,8 @@ namespace {
o["UCI_ShowCurrLine"] = Option(false);
o["UCI_Chess960"] = Option(false);
o["UCI_AnalyseMode"] = Option(false);
o["UCI_LimitStrength"] = Option(false);
o["UCI_Elo"] = Option(2900, 2100, 2900);
// Any option should know its name so to be easily printed
for (Options::iterator it = o.begin(); it != o.end(); ++it)