From 25a7186f3f0198162772e53f780857b00bd98a72 Mon Sep 17 00:00:00 2001 From: Disservin Date: Sat, 24 Feb 2024 11:56:33 +0100 Subject: [PATCH] Expose EvalFileSmall option for small net --- src/evaluate.cpp | 13 +++---------- src/uci.cpp | 3 +++ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index da0867660af..f22c0d06cbe 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -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; @@ -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; diff --git a/src/uci.cpp b/src/uci.cpp index d1d69d69752..35f725b5e89 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -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});