Skip to content

Commit 24c46bb

Browse files
committed
[GTP] Implement info command that returns app and model info in CSV format
1 parent 08b7484 commit 24c46bb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cpp/command/gtp.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ using namespace std;
2323
const string GET_MOVES_COMMAND = "get_moves";
2424
const string GET_POSITION_COMMAND = "get_position";
2525
const string GET_BOARDSIZE = "get_boardsize";
26+
const string INFO = "info";
2627

2728
static const vector<string> knownCommands = {
2829
//Basic GTP commands
2930
"protocol_version",
3031
"name",
3132
"version",
33+
INFO,
3234
"known_command",
3335
"list_commands",
3436
"quit",
@@ -2310,6 +2312,14 @@ int MainCmds::gtp(const vector<string>& args) {
23102312
}
23112313
}
23122314

2315+
else if (command == INFO) {
2316+
response = Version::getAppFullInfo(true);
2317+
if(engine->nnEval != nullptr)
2318+
response += "," + engine->nnEval->getInternalModelName();
2319+
if(engine->humanEval != nullptr)
2320+
response += "," + engine->humanEval->getInternalModelName();
2321+
}
2322+
23132323
else if(command == "known_command") {
23142324
if(pieces.size() != 1) {
23152325
responseIsError = true;

0 commit comments

Comments
 (0)