X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fuci.cpp;h=bb17b8d79b21ab8cd3e13855bcd404f7b074d545;hb=a0e2debe3f1d14f84984a9a2c1482dc41f695548;hp=47a8824e8035294ca11fc23a6a728ba4f85656bc;hpb=7ffae17f85709e49672a0e98e136b66aea067b2c;p=stockfish diff --git a/src/uci.cpp b/src/uci.cpp index 47a8824e..bb17b8d7 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -277,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