gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Jago and GNU Go


From: Dave Denholm
Subject: Re: [gnugo-devel] Jago and GNU Go
Date: 12 Jun 2002 19:02:58 +0100

<address@hidden> writes:

> Arend wrote:
> 
> > * The game contained some duplicate moves, causing GNU Go to crash when
> >   loading the .sgf-file (we already got a similar bug report and should of
> >   course fix that). Rene looked at it and it turned out
> >   that GNU Go submitted these moves twice via GMP (Jago had sent an OK
> >   in between). I have attached a GMP log file generated by jago of a
> >   9x9-match where GNU Go also sends a few moves twice, the first time at
> >   lines 37/40.  Does anyone more familiar with GMP have an idea where to
> >   start looking for the problem?
> 
> David wrote:
> 
> > It designed for lossy modems, so it is quite reasonable for either end
> > to send a message twice if the ack. did not arrive in time.
> 
> Maybe the bug is in Jago, that it should ignore the second send of the
> move and not be putting these duplicate moves in the game record.
> 


That is rather how it looks to me. Presumably jago has to use a reimplementation
of gmp in java, whereas gnugo is using the same implementation as
many other programs..?


Line 37...40 is

rcvd 00000000 10000000 11010000 10110000
5 48
sent 00000000 10000110 10000111 11111111
rcvd 00000000 10000000 11010000 10110000
5 48
sent 00000000 10000110 10000111 11111111
Move at 6 6
sent 00000001 10010010 11010100 10111101
rcvd 00000010 10001000 10000111 11111111


Quick look at the protocol suggests packets are 4-byte
sequences :

[0] = (my sequence bit) | (their seq << 1)
[1] = checksum
[2] = 0x80 | (cmd << 4) | (top 4 bits of value)
[3] = 0x80 | (value)


So we expect bottom two bits to toggle as messages are
exchanged.

The repeated command from gnugo has the same byte [0], which
suggests to me that it is a resend.. I think jago should
therefore assume that its ack got lost, and resend it, without
acting on the command.

If the ack and the resend passed on the wire, gnugo should
recognise the resent ack as an old ack, and discard it.


dd
-- 
address@hidden          http://www.insignia.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]