From 2e57f3fa222d9dd879662864799c1896f732de11 Mon Sep 17 00:00:00 2001 From: Tomasz Sobczyk Date: Wed, 7 Oct 2020 11:30:46 +0200 Subject: [PATCH] Switch to set recommended learn UCI options --- src/docs/learn.md | 2 ++ src/learn/learn.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/docs/learn.md b/src/docs/learn.md index eab33607..5cd2e8b5 100644 --- a/src/docs/learn.md +++ b/src/docs/learn.md @@ -14,6 +14,8 @@ It is **required** to set the `Use NNUE` UCI option to `pure` as otherwise the f Currently the following options are available: +`set_recommended_uci_options` - this is a modifier not a parameter, no value follows it. If specified then some UCI options are set to recommended values. + `bat` - the size of a batch in multiples of 10000. This determines how many entries are read and shuffled at once during training. Default: 1000 (meaning batch size of 1000000). `targetdir` - path to the direction from which training data will be read. All files in this directory are read sequentially. If not specified then only the list of files from positional arguments will be used. If specified then files from the given directory will be used after the explicitly specified files. diff --git a/src/learn/learn.cpp b/src/learn/learn.cpp index 80de6a57..6bba1dda 100644 --- a/src/learn/learn.cpp +++ b/src/learn/learn.cpp @@ -1745,6 +1745,18 @@ namespace Learner else if (option == "dest_score_min_value") is >> dest_score_min_value; else if (option == "dest_score_max_value") is >> dest_score_max_value; else if (option == "seed") is >> seed; + else if (option == "set_recommended_uci_options") + { + UCI::setoption("Use NNUE", "pure"); + UCI::setoption("MultiPV", "1"); + UCI::setoption("Contempt", "0"); + UCI::setoption("Skill Level", "20"); + UCI::setoption("UCI_Chess960", "false"); + UCI::setoption("UCI_AnalyseMode", "false"); + UCI::setoption("UCI_LimitStrength", "false"); + UCI::setoption("PruneAtShallowDepth", "false"); + UCI::setoption("EnableTranspositionTable", "false"); + } // Otherwise, it's a filename. else filenames.push_back(option);