X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fuci.cpp;h=bb17b8d79b21ab8cd3e13855bcd404f7b074d545;hb=559942d64de9497c9d6d13b22307b4b9e1ce8ecf;hp=051ff2e02f4a16f4fe2cb777a1c76746428b88fc;hpb=5346f1c6c72e46d66bb4c21259f8c06096c63034;p=stockfish diff --git a/src/uci.cpp b/src/uci.cpp index 051ff2e0..bb17b8d7 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::export_net(filename); + } else if (!token.empty() && token[0] != '#') sync_cout << "Unknown command: " << cmd << sync_endl;