What boardsize does to the board is undefined. You are adding content to something that was never stated. I don't think anyone ever said that boardsize was supposed to retain state from some other board. Undefined simply means that you shouldn't ASSUME the board is clear after a boardsize command.
So it makes perfect sense to me that the boardsize command isn't specifically designed to put the board into a specific state.
You will also note, to illustrate the point, that boardsize isn't designed to alter the playing level of the engine, or set handicap points. If it were overloaded to do other things like this, I would consider it confusing and ill defined.
Since what boardsize actually does is not defined as far as board contents are concerned, you are free to implement with an additional clearing of the board, which is what I do. It cannot be an error to do this because the standard explicity states that you can do anything you want. It's not wrong or even ugly to choose to clear the board, or not clear the board.
So I personally think the command set is fairly clean in this regard (although I have some other complaints I doubt anything would satisfy us all at the same time.)
boardsize is a specific command to change the size of the board and nothing else.
clear_board is a specific command to clear out the contents of the squares, and nothing else.
I like the idea of "reset_board 19" or similar to do what you want in a single command, but that's probably a different discussion.
Don
On Sunday 17 July 2005 8:54 pm, Chris Spencer wrote:
drd@mit.edu wrote:
I think it makes sense the way it's currently implemented. What boardsize does to the board is undefined and I think it makes sense for it to remain undefined.
One might argue for a single board_size command that functions as both, and I would be alright with that but it shouldn't be called "boardsize". It should be something like reset_board with an argument indicating boardsize.
- Don
That doesn't really answer my question. Do you have a logical reason for why it "makes sense" to save piece positions? Have you ever played a game half way, resized the board, then kept playing without clearing the board?
If you have no need to save the pieces on the board, then you shouldn't. Not clearing the board just leads to confusion should you forget to explicitly tell the computer to resize AND clear, then it starts playing with a corrupted board.
Chris
gtp mailing list gtp@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/gtp