]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Limit double extensions
[stockfish] / src / uci.cpp
index 051ff2e02f4a16f4fe2cb777a1c76746428b88fc..bb17b8d79b21ab8cd3e13855bcd404f7b074d545 100644 (file)
@@ -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<std::string> 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;