X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fuci.cpp;h=d5ffa2283197eaa73901620d971407106bb969d7;hb=9b82414b67aa7d1279e1cc99a6970ab766025bfa;hp=051ff2e02f4a16f4fe2cb777a1c76746428b88fc;hpb=5346f1c6c72e46d66bb4c21259f8c06096c63034;p=stockfish diff --git a/src/uci.cpp b/src/uci.cpp index 051ff2e0..d5ffa228 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -277,6 +277,14 @@ void UCI::loop(int argc, char* argv[]) { else if (token == "d") sync_cout << pos << sync_endl; else if (token == "eval") trace_eval(pos); else if (token == "compiler") sync_cout << compiler_info() << sync_endl; + else if (token == "export_net") + { + std::optional filename; + std::string f; + if (is >> skipws >> f) + filename = f; + Eval::NNUE::save_eval(filename); + } else if (!token.empty() && token[0] != '#') sync_cout << "Unknown command: " << cmd << sync_endl;