test nnue test_features等の有効化

This commit is contained in:
tttak
2020-06-08 13:57:55 +09:00
committed by nodchip
parent d23f96d156
commit 91a7557ab4
4 changed files with 40 additions and 14 deletions

View File

@@ -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;