From: Fabian Fichter Date: Thu, 1 Jul 2021 22:20:42 +0000 (+0200) Subject: Merge official-stockfish/master X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e22f6986e2ec42abb1143cd65ed9cefa26af77b9;p=fairystockfish.git Merge official-stockfish/master --- e22f6986e2ec42abb1143cd65ed9cefa26af77b9 diff --cc src/evaluate.cpp index 9b30887,c396e0f..af810e0 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@@ -47,11 -47,8 +47,9 @@@ // Note that this does not work in Microsoft Visual Studio. #if !defined(_MSC_VER) && !defined(NNUE_EMBEDDING_OFF) INCBIN(EmbeddedNNUE, EvalFileDefaultName); - constexpr bool gHasEmbeddedNet = true; #else - constexpr bool gHasEmbeddedNet = false; const unsigned char gEmbeddedNNUEData[1] = {0x0}; + [[maybe_unused]] const unsigned char *const gEmbeddedNNUEEnd = &gEmbeddedNNUEData[1]; const unsigned int gEmbeddedNNUESize = 1; #endif diff --cc src/uci.cpp index a78caa9,bb17b8d..310396b --- a/src/uci.cpp +++ b/src/uci.cpp @@@ -348,22 -277,14 +348,29 @@@ 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") Eval::NNUE::export_net(); + 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 == "load") { load(is); argc = 1; } // continue reading stdin + else if (token == "check") check(is); + // UCI-Cyclone omits the "position" keyword + else if (token == "fen" || token == "startpos") + { +#ifdef LARGEBOARDS + if (Options["Protocol"] == "uci" && Options["UCI_Variant"] == "chess") + { + Options["Protocol"].set_default("ucicyclone"); + Options["UCI_Variant"].set_default("xiangqi"); + } +#endif + is.seekg(0); + position(pos, is, states); + } else if (!token.empty() && token[0] != '#') sync_cout << "Unknown command: " << cmd << sync_endl;