mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 03:26:24 +08:00
test nnue test_features等の有効化
This commit is contained in:
23
src/uci.cpp
23
src/uci.cpp
@@ -33,6 +33,10 @@
|
||||
#include "uci.h"
|
||||
#include "syzygy/tbprobe.h"
|
||||
|
||||
#if defined(EVAL_NNUE) && defined(ENABLE_TEST_CMD)
|
||||
#include "eval/nnue/nnue_test_command.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern vector<string> setup_bench(const Position&, istream&);
|
||||
@@ -64,6 +68,19 @@ namespace Learner
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(EVAL_NNUE) && defined(ENABLE_TEST_CMD)
|
||||
void test_cmd(Position& pos, istringstream& is)
|
||||
{
|
||||
// <20>T<EFBFBD><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>邩<EFBFBD><E982A9><EFBFBD>m<EFBFBD><6D><EFBFBD>Ȃ<EFBFBD><C882>̂ŏ<CC82><C58F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD>B
|
||||
is_ready();
|
||||
|
||||
std::string param;
|
||||
is >> param;
|
||||
|
||||
if (param == "nnue") Eval::NNUE::TestCommand(pos, is);
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
// position() is called when engine receives the "position" UCI command.
|
||||
// The function sets up the position described in the given FEN string ("fen")
|
||||
@@ -376,6 +393,12 @@ void UCI::loop(int argc, char* argv[]) {
|
||||
else if (token == "search") search_cmd(pos, is);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(EVAL_NNUE) && defined(ENABLE_TEST_CMD)
|
||||
// <20>e<EFBFBD>X<EFBFBD>g<EFBFBD>R<EFBFBD>}<7D><><EFBFBD>h
|
||||
else if (token == "test") test_cmd(pos, is);
|
||||
#endif
|
||||
|
||||
else
|
||||
sync_cout << "Unknown command: " << cmd << sync_endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user