Skip to content

Commit

Permalink
Expose EvalFileSmall option for small net
Browse files Browse the repository at this point in the history
Since official-stockfish/fishtest#1870 has been merged
it's time for this update.

5k Fixed Games showed no problems.
https://tests.stockfishchess.org/tests/view/65d9cc274c0e22b904f574d7

closes #5068

No functional change
  • Loading branch information
Disservin committed Feb 24, 2024
1 parent fc41f64 commit d07033d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/evaluate.cpp
Expand Up @@ -77,11 +77,7 @@ NNUE::EvalFiles NNUE::load_networks(const std::string& rootDirectory,

for (auto& [netSize, evalFile] : evalFiles)
{
// Replace with
// options[evalFile.optionName]
// once fishtest supports the uci option EvalFileSmall
std::string user_eval_file =
netSize == Small ? evalFile.defaultName : options[evalFile.optionName];
std::string user_eval_file = options[evalFile.optionName];

if (user_eval_file.empty())
user_eval_file = evalFile.defaultName;
Expand Down Expand Up @@ -149,11 +145,8 @@ void NNUE::verify(const OptionsMap& optio

for (const auto& [netSize, evalFile] : evalFiles)
{
// Replace with
// options[evalFile.optionName]
// once fishtest supports the uci option EvalFileSmall
std::string user_eval_file =
netSize == Small ? evalFile.defaultName : options[evalFile.optionName];
std::string user_eval_file = options[evalFile.optionName];

if (user_eval_file.empty())
user_eval_file = evalFile.defaultName;

Expand Down
3 changes: 3 additions & 0 deletions src/uci.cpp
Expand Up @@ -83,6 +83,9 @@ UCI::UCI(int argc, char** argv) :
options["EvalFile"] << Option(EvalFileDefaultNameBig, [this](const Option&) {
evalFiles = Eval::NNUE::load_networks(cli.binaryDirectory, options, evalFiles);
});
options["EvalFileSmall"] << Option(EvalFileDefaultNameSmall, [this](const Option&) {
evalFiles = Eval::NNUE::load_networks(cli.binaryDirectory, options, evalFiles);
});

threads.set({options, threads, tt});

Expand Down

0 comments on commit d07033d

Please sign in to comment.