X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fuci.cpp;h=bb17b8d79b21ab8cd3e13855bcd404f7b074d545;hb=559942d64de9497c9d6d13b22307b4b9e1ce8ecf;hp=b3017e910696860b0bd7da46756ed97f9dfc61bf;hpb=c4d67d77c99b99c9ac387ab622773a320f8d5cc3;p=stockfish diff --git a/src/uci.cpp b/src/uci.cpp index b3017e91..bb17b8d7 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -34,6 +34,8 @@ using namespace std; +namespace Stockfish { + extern vector setup_bench(const Position&, istream&); namespace { @@ -275,7 +277,15 @@ 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 + else if (token == "export_net") { + std::optional filename; + std::string f; + if (is >> skipws >> f) { + filename = f; + } + Eval::NNUE::export_net(filename); + } + else if (!token.empty() && token[0] != '#') sync_cout << "Unknown command: " << cmd << sync_endl; } while (token != "quit" && argc == 1); // Command line args are one-shot @@ -369,3 +379,5 @@ Move UCI::to_move(const Position& pos, string& str) { return MOVE_NONE; } + +} // namespace Stockfish