From: Fabian Fichter Date: Thu, 1 Jul 2021 22:11:00 +0000 (+0200) Subject: Merge official-stockfish/master X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=4d62eb123874d8acb5359955e7ea64682f4d42e7;p=fairystockfish.git Merge official-stockfish/master bench: 4806948 --- 4d62eb123874d8acb5359955e7ea64682f4d42e7 diff --cc src/evaluate.cpp index b9ae0ab,f0784e8..9b30887 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@@ -46,9 -47,10 +47,11 @@@ // 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/search.cpp index 2bcb937,bcd53f9..299de9e --- a/src/search.cpp +++ b/src/search.cpp @@@ -1298,17 -1154,6 +1297,12 @@@ moves_loop: // When in check, search st } } - // 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(pos).size() == 1)) + extension = 1; + // Add extension to new depth newDepth += extension; diff --cc src/uci.cpp index 009a088,64bb7a7..a78caa9 --- a/src/uci.cpp +++ b/src/uci.cpp @@@ -348,21 -277,7 +348,22 @@@ 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 == "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;