|
||
Title: gamestate file Post by doublep on Feb 20th, 2010, 6:47am I added simple logging to Badger and "game metadata" to help correspond log entries with actual games. I have two questions about contents of game state file: - 'wplayer' and 'bplayer' seem to start with an asterisk ('*'), what does that mean? - neither 'tableId' nor 'gameId' seem to give the ID used on the site e.g. when viewing the game; for instance, Badger logged "Game 166532, move 1; playing against * bot_ArimaaScoreP1", but the link in its recent games is http://arimaa.com/arimaa/games/jsShowGame.cgi?gid=135363&s=b, with a completely different ID. How do I find it so that logs are more useful? |
||
Title: Re: gamestate file Post by Janzert on Feb 20th, 2010, 9:00am The game id during the game is temporary, you can see this when playing as a human too. The permanent id isn't assigned until after the game has finished. I don't believe the permanent id is ever available with the getmove interface so the best you can probably do is the time and date, etc.. AEI's interface will get and write the permanent ID to the AEI log after the end of the game. The ability to even query this is something that was added fairly recently and wouldn't be available until after the last time the getmove interface starts the bot. The players names are given an asterisk when the server believes they are connected to (seated at?) the game. This isn't completely reliable though. Janzert |
||
Title: Re: gamestate file Post by doublep on Feb 20th, 2010, 9:18am Thanks. It's a pity there is no way to know "real" game ID, sounds like something server could certainly manage to do (i.e. just assign it when a game starts) without problems... About '*' I think I'll just strip it if it's there then. I'm going to use AEI after this championship, just don't want to do that now. However, that won't replace GTP for me, I'll better write another bridge script ;) GTP just serves a different (broader scope) function. |
||
Title: Re: gamestate file Post by omar on Feb 20th, 2010, 2:01pm Yes, just strip off the leading '*'. I've started recording the temporary id with the finished games, so you can get to the finished game using a URL like this with the tempid. http://arimaa.com/arimaa/gameroom/opengamewin.cgi?tempid=166532 |
||
Title: Re: gamestate file Post by doublep on Feb 20th, 2010, 2:43pm on 02/20/10 at 14:01:24, omar wrote:
Thanks, that would help. However, maybe it would be possible to just get away with tempid and make it equal with real ID? I mean for newly created games, of course. With implemented improvement it is now easy to find game on the server from the logs, but it is still difficult to find log entries if you have game ID. |
||
Title: Re: gamestate file Post by doublep on Feb 20th, 2010, 2:45pm And while we are at it, is it possible to set up some automated way of retrieving any per-bot files from the server? For instance, if I want to investigate some game during WCC, will I be able to have a look at 'badger.log'? File name doesn't matter for me, I can tell Badger to log message to a different file. But in principle? |
||
Title: Re: gamestate file Post by omar on Mar 3rd, 2010, 11:31am on 02/20/10 at 14:43:27, doublep wrote:
When initially designing the site, I decided to have a table for games that are in progress and a separate table for games that have finished. Each table has it's own auto increment id. It looked like a good decision at the time and still does have many pros, but I didn't see that mapping between the two ids could become a problem. Storing the tempid in the permanent game table has helped. I'll start also showing the tempid on the game comments page. This should make it easier to find the log entries. |
||
Title: Re: gamestate file Post by omar on Mar 3rd, 2010, 11:39am on 02/20/10 at 14:45:59, doublep wrote:
Each bot has a logs directory which is accessible from the web. If the bot writes a file to this directory you should be able to view it during the WCC. http://gold.arimaa.com/~badger/logs/ It is the same directory even if you use the silver.arimaa.com server since the bot home directories are shared between the servers. |
||
Title: Re: gamestate file Post by doublep on Mar 3rd, 2010, 11:49am on 03/03/10 at 11:31:51, omar wrote:
Maybe it is possible to insert an empty row in finished game table when starting a new game? Then you'd have a real ID from the start. Of course, such empty rows would have to be filtered out in all places, with difficulty probably depending on how many such places there are. Or maybe you could insert an empty row and then immediately delete it, so that ID is generated but invalid rows don't mess things in other places. Then, when a game finishes, you could insert in the finished game table with previously generated ID. About logs: thanks, I was told this already in the chat, as I remember by Janzert. Badger's log file is in that directory now, so if something goes wrong in WCC you can always check it. |
||
Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1! YaBB © 2000-2003. All Rights Reserved. |