mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Fine tune skill level
Rescaled Skill level from 0 to 20. At level 19 is still comparable with Crafty 20.14, while at low levels strength increase is now less steep. Thanks to Joona and Heinz for testing and valuable comments. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
41fe70d703
commit
d173285da5
2 changed files with 6 additions and 6 deletions
|
@ -515,7 +515,7 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[
|
|||
|
||||
// Do we have to play with skill handicap? In this case enable MultiPV that
|
||||
// we will use behind the scenes to retrieve a set of possible moves.
|
||||
MultiPV = (SkillLevel < 10 ? Max(UCIMultiPV, 4) : UCIMultiPV);
|
||||
MultiPV = (SkillLevel < 20 ? Max(UCIMultiPV, 4) : UCIMultiPV);
|
||||
|
||||
// Set the number of active threads
|
||||
ThreadsMgr.read_uci_options();
|
||||
|
@ -756,9 +756,9 @@ namespace {
|
|||
}
|
||||
}
|
||||
|
||||
// When playing with strength handicap choose best move among the MultiPV
|
||||
// set using a statistical rule dependent on SkillLevel.
|
||||
if (SkillLevel < 10)
|
||||
// When playing with strength handicap choose best move among the MultiPV set
|
||||
// using a statistical rule dependent on SkillLevel. Idea by Heinz van Saanen.
|
||||
if (SkillLevel < 20)
|
||||
{
|
||||
assert(MultiPV > 1);
|
||||
|
||||
|
@ -768,7 +768,7 @@ namespace {
|
|||
int size = Min(MultiPV, (int)Rml.size());
|
||||
int max = Rml[0].pv_score;
|
||||
int var = Min(max - Rml[size - 1].pv_score, PawnValueMidgame);
|
||||
int wk = 128 - 8 * SkillLevel;
|
||||
int wk = 120 - 2 * SkillLevel;
|
||||
|
||||
// PRNG sequence should be non deterministic
|
||||
for (int i = abs(get_system_time() % 50); i > 0; i--)
|
||||
|
|
|
@ -98,7 +98,7 @@ void init_uci_options() {
|
|||
Options["Ponder"] = Option(true);
|
||||
Options["OwnBook"] = Option(true);
|
||||
Options["MultiPV"] = Option(1, 1, 500);
|
||||
Options["Skill level"] = Option(10, 0, 10);
|
||||
Options["Skill level"] = Option(20, 0, 20);
|
||||
Options["Emergency Move Horizon"] = Option(40, 0, 50);
|
||||
Options["Emergency Base Time"] = Option(200, 0, 30000);
|
||||
Options["Emergency Move Time"] = Option(70, 0, 5000);
|
||||
|
|
Loading…
Add table
Reference in a new issue