// 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
}
}
- // Check extension (~2 Elo)
- else if ( givesCheck
- && (pos.is_discovered_check_on_king(~us, move) || pos.see_ge(move)))
- extension = 1;
-
+ // Losing chess capture extension
+ else if ( pos.must_capture()
+ && pos.capture(move)
+ && (ss->inCheck || MoveList<CAPTURES>(pos).size() == 1))
+ extension = 1;
+
// Add extension to new depth
newDepth += extension;
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 == "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;