[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [computer-go] Wishlist for playing programs on KGS

On Wed, 12 Oct 2005, William M. Shubert wrote:

> After thinking it over, I have decided that maybe the best solution is
> one that would give the most flexibility to the engine authors, at the
> expense of some complexity to them. This solution I'm about to propose
> is something that has been requested before for other reasons, and it
> may be useful in general.
> My solution:
>      1. Whenever a user talks to the engine at all, forward the text as
>         a KGS-specific command. Something like "kgs-chat <username>
>         <text>"
>      2. If the response to this command to the engine is a success and
>         includes text after the "=", then the text of the response will
>         be sent back to the user who sent the chat.
>      3. When a game ends, the engine will get a clear board request.
>         Since clear boards never appear in-game (as long as you support
>         the undo command that is!), an engine can treat this command as
>         a "the game is over" signal. When the engine exits, kgsGtp logs
>         out, so if an engine decides though chat or any other mechanism
>         that it should log out when the game ends, it can simply exit
>         when it gets the next clear board request (or exit right now if
>         the last request that it received was a clear board).
>      4. This does have the drawback that, like all GTP commands, it will
>         be serialized, so if you send a message to the engine while it
>         is thinking, you will not get a response until the reponse move
>         arrives.

I am worried that you are just opening a big can of worm here. Are you
sure that you can keep the chat messages free of special character that
would invalidate the GTP stream? Or there could be a bug in the engine
with the handling of GTP-allowed characters that have never appeared
before, that allows any KGS observer to crash a robot running on KGS.
You may at some point want to allow unicode in user names.
(Ok I won't start about the buffer overflow in the GTP input handling of
my engine that allows a remote exploit via KGS chat :)

I think if you do that, you should at least give a configuration option
to limit the kgs-chat interface to a specified list of KGS usernames.

> My feelings on the other proposals:

What is wrong with kgsGtp checking for the existence of a lock file 
whenever a game has ended?


computer-go mailing list