X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fuci.cpp;h=d5ffa2283197eaa73901620d971407106bb969d7;hb=9b82414b67aa7d1279e1cc99a6970ab766025bfa;hp=47a8824e8035294ca11fc23a6a728ba4f85656bc;hpb=7ffae17f85709e49672a0e98e136b66aea067b2c;p=stockfish diff --git a/src/uci.cpp b/src/uci.cpp index 47a8824e..d5ffa228 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::save_eval(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