UCT pattern prior: -1000 -> -400 based on Jean-loup's tuning
[pachi/nmclean.git] / gtp.h
blob697dbe9326b8d7f355e06ad153c342f614b86958
1 #ifndef PACHI_GTP_H
2 #define PACHI_GTP_H
4 struct board;
5 struct engine;
6 struct time_info;
8 enum parse_code {
9 P_OK,
10 P_NOREPLY,
11 P_DONE_OK,
12 P_DONE_ERROR,
13 P_ENGINE_RESET,
14 P_UNKNOWN_COMMAND,
17 enum parse_code gtp_parse(struct board *b, struct engine *e, struct time_info *ti, char *buf);
18 void gtp_reply(int id, ...);
19 bool gtp_is_valid(char *cmd);
21 #define is_gamestart(cmd) (!strcasecmp((cmd), "boardsize"))
22 #define is_reset(cmd) (is_gamestart(cmd) || !strcasecmp((cmd), "clear_board") || !strcasecmp((cmd), "kgs-rules"))
23 #define is_repeated(cmd) (strstr((cmd), "pachi-genmoves"))
25 #endif