Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Site Discussion >> Send permanent game ID at end of game
(Message started by: Janzert on Sep 5th, 2009, 10:03pm)

Title: Send permanent game ID at end of game
Post by Janzert on Sep 5th, 2009, 10:03pm
This may or may not be possible depending on details of how the server works. It would be quite nice if the final update from the game server could include the permanent database game id for the game. Bots could then record this in their log file if desired and clients for humans could display it in the chat or other appropriate area. This would allow a game to be easily found and referenced after the game is complete.

Janzert

Title: Re: Send permanent game ID at end of game
Post by omar on Sep 22nd, 2009, 9:27pm
The game server would not be able to provide the permanent game id. However, it would be possible to make a request to the game room with the temporary id and get back the permanent id.

I added a 'findgameid' action to the gameroom protocol.
 http://arimaa.com/arimaa/protocol/

Title: Re: Send permanent game ID at end of game
Post by Janzert on Sep 22nd, 2009, 11:02pm
Thanks Omar, that should work great.

If it's not a problem it might be a little cleaner for bot clients if this could be added to the bot1gr.cgi as well.

Janzert

Title: Re: Send permanent game ID at end of game
Post by omar on Sep 23rd, 2009, 9:35pm
Good idea. Added 'findgameid' to bot1gr.cgi also. Thanks.

Title: Re: Send permanent game ID at end of game
Post by Janzert on Sep 28th, 2009, 10:17pm
Omar, could you double check that this made it onto the server. It seems to only work through client1gr.cgi at the moment.

Thanks,
Janzert

Title: Re: Send permanent game ID at end of game
Post by omar on Oct 7th, 2009, 6:28pm
I just checked bot1gr.cgi and it works OK.

http://arimaa.com/arimaa/gameroom/bot1gr.cgi?action=findgameid&tid=145672

If you still see the problem, let me know by email and we'll work through it.

Title: Re: Send permanent game ID at end of game
Post by Janzert on Oct 7th, 2009, 8:01pm
Oops, I had forgotten that the url used during the game (the table url?) was different from the gameroom url. Switching to the correct url works.

Thanks again,
Janzert

Title: Re: Send permanent game ID at end of game
Post by Janzert on Nov 25th, 2009, 4:13pm
It seems like this fails somewhere around a third of the time. Instead of the game id I get an error back from the server:

error=Gameroom: Cannot find the game with temp id of

(That's the complete message, there is no id given in the error message)

At first I thought I must be sending a bad temporary id but I checked what I sent to the server and I don't see any correlation between errors and successful responses.

The post body that generated the error above:

action=findgameid&tid=153353

and one that worked fine:

action=findgameid&tid=153377

So it seems like the script is failing to parse the id sometimes but I'm not sure what it correlates with.

Janzert

Title: Re: Send permanent game ID at end of game
Post by omar on Dec 9th, 2009, 7:00pm
Strange. Are you making this request right after creating the game. It might be a timing issue with the game not being completely created before the request. Maybe adding a couple seconds of delay might fix it. Or maybe retry the request with increasing second intervals.

Title: Re: Send permanent game ID at end of game
Post by Janzert on Dec 9th, 2009, 8:29pm
The request is sent very quickly after receiving the result of the game from the server. I'll change it to retry a few times with an increasing back off and see how it does.

Janzert

Title: Re: Send permanent game ID at end of game
Post by Meneldor on Dec 11th, 2009, 4:00pm
That would be a useful feature.  Janzert - I think I recently played against one of your bots and it timed out once I had all traps covered



Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.