Well things have been quiet lately, so I think I'll put out a set of commands for server play to think about. I've been going from Phil's straw man version of the spec; Phil, you can plug these into the next revision if you want.
It seems that only 5 more commands are needed. The trickiest thing is setting up games; and the related problem of specifying the server game exactly when somebody challenges the program. To do things well, we need to be able to tell the engine exactly what the time system is. Engines can choose to ignore this of course.
Having written a client for IGS/NNGS/etc. and for KGS, I'm pretty sure that these five commands will give us the functionality we need for all these servers. If anybody has information on dashn, cyberkiwon, etc., and thinks this will have to be changed for them, that's no problem.
********************************************************************** GTP commands for go servers ---------------------------------------------------------------------- Command: play_mode This is the bridge's attempt to find out whether the go engine is looking for games, or if it intends to play a particular game vs. a particular opponent.
Engine Responses: If the engine is in general looking for games: any If the engine is looking to play a particular opponent, with particular settings: <color> <user> <handicap> <handicap fixed?> <ko setting> <suicide> <scoring system> <time system>
Time system format: <style>[,<main_time>[,<byo-yomi time>,(<stones>|<# of periods>)]] <style> is one of "none", "absolute", "canadian", "byoyomi"
---------------------------------------------------------------------- Command: game_ok <color> <user> <handicap> <handicap fixed?> <ko setting> <suicide> <scoring system> <time> This is the bridge's query to the engine, as to whether a particular game is acceptable. Note that the arguments are exactly the same as the response to "play_mode".
Engine Responses: "y" or "n" "y" will probably be followed soon by a serios of "komi", "board_size", etc. commands then finally a "new_game". ---------------------------------------------------------------------- Command: undo_ok Here the bridge is saying that the opponent wants an undo. The engine can allow or disallow.
Responses: "y" or "n" ---------------------------------------------------------------------- Command: query_dead The game is over. The brige is asking the engine what stones it thinks are dead. If the engine does not know, then it answering with a not implemented error is OK...in this case, it will be up to the opponent to decide which stones are dead.
responses: List all locations on the board that contain dead stones. ---------------------------------------------------------------------- Command: time_left <color> <seconds left in period> [<stones left>] The server is telling the engine how much time is left on the clocks for the color specified. The time reported should be the server's idea of how much time is left, so if there is netlag the engine's clock will not drift from the server's. ---------------------------------------------------------------------- Command: comment The server is telling you that somebody is trying to talk to the engine. Any text in the response will be sent back to the user who was talking. **********************************************************************