Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Winboard and "/mg xx" start parameter

Author: Robert Hyatt

Date: 14:26:16 10/14/99

Go up one level in this thread


On October 14, 1999 at 13:22:19, Jeremiah Penery wrote:

>On October 14, 1999 at 09:41:23, Robert Hyatt wrote:
>
>>On October 14, 1999 at 05:56:32, Jouni Uski wrote:
>>
>>>Why do I get a lot of these games??
>>
>>there is an unfortunate timing hole that is not easy to fix.  Either program
>>can resign, and if they (for some reason) do it more than once, winboard will
>>see the first resign, start anew game, see the second resign, and assume that
>>is really intentional.
>>
>>I'll look at a patch for winboard to ignore resign/draw/result commands for
>>the first couple of moves, to prevent this.  If I can figure out how to fix
>>it, I'll send the fix to tim...
>
>Wouldn't it be easier to just clear the pipe when a new game happens?
>
>Jeremiah


There is a race.  Which happens:

(1) you clear the pipe, then send a new command.  but there is a timing
window between clearing the pipe and sending the new command where the
program can send you a resign.

(2) you send a new command, then clear the pipe.  But that doesn't force
the _program_ to clear the pipe, so he sends a resign, then gets the new,
after you have cleared the pipe.

There is one possible work-around... ignoring 'resign' or 'result' for the
first two moves.  That means that the engines won't have to deal with the
race, but they can still have bugs and offer draws when they shouldn't.

The other workaround requires a hand-shake between the engine and interface,
so that winboard sends a "new" and ignores anything until the engine sends a
"new" back.  That requires changes in the protocol and is a mess to do since
there are already so many winboard engines around.  I like the idea of just
having winboard ignore the 'termination' signals like resign, draw, result,
until at least 2 moves have been played by each side.

Of course, the minor problem here is that someone can hang and the other program
can't 'call the flag' on move one or two...



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.