Dan wrote:
Normally the gtp controller will know these before the engine does but there is an exception after the command loadsgf is executed.
Because of this exception, there should be a way of getting the boardsize from the engine.
Actually there should be a way of getting the whole position from the engine
This already exists in GNU Go.
but for my purposes just getting the boardsize will be enough.
There seem to be two obvious ways of doing this:
(1) allow the command 'boardsize' without arguments. The gtp response is to return the boardsize without setting it.
(2) a new command query_boardsize with obvious functionality:
loadsgf games/nicklas/nicklas9.sgf = black
query_boardsize = 9
I've patched GNU Go 3.1.2 to add this command (because I need it) but I wonder if this is something that is likely to become part of the protocol or not.
In principle there's no need for a loadsgf command since the controller could read the sgf file and feed the moves to the engine. Then it would also have full knowledge of board size and other information. On the other hand, the experience from the GNU Go regression system clearly shows that loadsgf is worth having and then, as you say, some query commands are needed (at least boardsize and komi).
Those would also be useful for testing purposes, so they should be included in the protocol, although not part of the tournament subset.
In the choice between 'boardsize' without argument and 'query_boardsize', I definitely prefer the latter.
/Gunnar