I understand exactly what you are saying and why you feel uncomfortable with undefined behavior. I would expect that many would feel the same way you do and I don't make any claims that you are "wrong" or anything. It's a matter of personal preference.
What I'm defending is the consistancy of the current implementation or standard. I don't see anything unnatural or broken about it.
If you look at computer languages you may notice something similar in how arrays or variables get declared or initialized. Do they get set to zero when they are declared? If so, what is so special about zero? What actually happens depends on which language you program in and sometimes the scope of the variable. It seems to have something to do with the language designers philosophy or preference or perhaps hardware issues and convenience.
I personally don't have a problem with accepting that "boardsize n" isn't very useful unless it is immediately followed up with a clearboard command. In languages that don't initialize variables that are declared, I accept that the presence of a variable isn't very useful until it is assigned a value.
Again, if I had my choice a command would be added like "new_game n" or "reset_board n" and the other commands could be deprecated and their use discouraged. Personally, I find it slightly uncomfortable to use the terminolgy "boardsize" when you really mean "new_game."
I guess what really bothers me is that there is also a clear_board command. What should clear_board do if boardsize is mandated to also clear the board? It seems redundant.
So you would like boardsize to be defined to have the behavior that it clears the board too? Then it would be ok to forget to issue the clear_board command? I hope that's not the only reason for doing it. I really wouldn't like it to simply be a device to allow some sloppiness unless it was explicity designed to be the ONLY way to start a new game, in which case I would be comfortable with it being called something else to avoid confusion with previous versions of the protocol.
- Don
P.S. In my opinion, this is why you are uncomfortable:
boardize 13 clearboard play b e4 boardsize 13 genmove w
The last command is meaningless because you don't know what state the board is in. The second boardsize commmand left the board in an unknown state.
I'm not uncomfortable with this because I view it as simply an ill-formed set of commands. It's like a computer program that crashes because it is written wrong. You can't force a gtp controller to issue commands that make sense, it has to be built intelligently to do the right thing.
On Sunday 17 July 2005 10:50 pm, Chris Spencer wrote:
drd@mit.edu wrote:
What boardsize does to the board is undefined. [snip]
And the point I've been trying to make is that this behavior should not be undefined. There's never a case where you would want to retain the board contents. Therefore, it makes sense to have boardsize explicitly clear the board contents.
Chris
gtp mailing list gtp@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/gtp