[Computer-go] CGOS Dropped Connections - Two automatic losses on time.

Robert Finking robertfinkng555 at o2.co.uk
Mon Nov 8 14:28:33 PST 2010

Hi Don,

On 08/11/2010 14:17, Don Dailey wrote:
> One possible solution is for the server to force the previous login to 
> disconnect if it thinks that player is currently connected.   It will 
> send a quit command to the client and then realize there is no 
> connection and this is trapped.
It's a nice approach - simple and effective - but needs safeguards I 
think. If two people are using the standard engine pack, the second 
person who comes along will boot the first off the server. If the first 
then tries to reconnect, they will boot the second etc.. How about a 
1-minute safeguard? An incoming login only boots the current login if it 
hasn't been heard from for over 1 minute? On 13x13 and 19x19 longer 
timeouts may be needed.

> On time forfeit I could automatically close the connection which 
> should also tell the server what the state of the connection is.    It 
> will of course be up to the client to reconnect.
  Would the built in client auto-connect work in this circumstance? Good 
idea in any case =)

> I should probably not forfeit games where one of the players has not 
> made at least 1 move - although the previous 2 fixes should prevent 
> that from happening.    But this might be useful for debugging new 
> programs.
This sounds like a good idea to me too.

These are great ideas.  I think the first idea is the one that really 
gets to the root of the problem (provided we can avoid the danger of 
different instances stealing logins when there has been no loss of 

A final thought - how about increasing K for games that are lost on time?

Hope this is useful feedback.



> Don
> On Fri, Nov 5, 2010 at 9:04 PM, Robert Finking 
> <robertfinkng555 at o2.co.uk <mailto:robertfinkng555 at o2.co.uk>> wrote:
>     Hi Don, All,
>     During the current testing cycle of the engine pack, one thing
>     I've noticed is the excellent built in facility of the CGOS client
>     to handle my internet connection going down. As soon as it goes
>     down, it automatically tries to reconnect. However, the server
>     doesn't handle this so well.
>     The client realises the connection has dropped and tries to log in
>     again. The server doesn't notice the client has gone. When the
>     client attempts to reconnect, the server thinks it is already
>     there. This causes two losses:
>     1. The engine can't finish the interrupted game and loses that
>     game on time
>     2. The server thinks the engine is still connected, so it
>     schedules another game for the engine, which it also loses on time.
>     The good news is the reconnect does happen after not too long (a
>     couple of games go by before the login times out).
>     Is it possible to easily improve this? I know from experience that
>     detecting a loss of connection can be problematic due to timeouts
>     in the network stack. Would it be possible to add some kind of
>     Client->Server heartbeat/ping. The client sends a heartbeat say
>     once per 10 seconds. If you miss two heartbeats on the trot, you
>     automatically kill the login.
>     If adding heartbeats is too much, how about just timing out if you
>     haven't had a response from the client for over a minute since the
>     last move?
>     As an easy safeguard against two losses, you could automatically
>     log out if a player loses on time.
>     Just a thought - hope it helps. Thanks again for an excellent
>     setup - there are so many things you have thought of already!
>     Raffles

More information about the Computer-go mailing list