In addition to Phil's draft specification, some GTP doc may be found in the GNU Go texinfo. There is also some code in GNU Go (two files gtp.c and gtp.h) which has a more liberal license than the GPL allowing use in proprietary software.
The protocol was developed mostly by Gunnar Farneback in GNU Go 2.7.xxx culminating in GNU Go 3.0. There have been a few minor changes in GNU Go's implementation post-3.0. There are some discrepancies between Phil's draft and GNU Go's implementation and both are likely to change in the future. But in cases of doubt the safest course might be to copy GNU Go's behavior, and to be prepared to make changes in the future as the protocol evolves. Hopefully by the time GNU Go 3.2 exists (or even long before) the specification will be complete. In any case you should read the documentation in the GNU Go Texinfo.
- What kind of return (success or failure) does the engine
have to return if it does not implement the command which was requested? The spec says "..should return 'not_implemented'", but does not specify the return type (by the way, there is a
Presumably this is a failure so assuming this proposal is adopted the full response would be:
? not_implemented
This is not currently GNU Go's behavior. GNU Go does this:
extemporize ? unknown command: 'extemporize'
By the way, the 'text' "a1" may as well be a 'coordinate' in a command argument and thus has two different derivations also. I see two possible solutions:
You should be aware that the protocol is asymmetrical so the command syntax could overlap harmlessly with the response syntax.
By the way: is it spelled "gen_move" or "genmove"?
"genmove" .
6.What is the exact format of the answer to 'help'? Specifically, is the first command returned on the same line as the '=' or on the next one?
In GNU Go the first command is on the same line as '='.
Dan