Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Bot Development >> Bot Interface Gamestate file
(Message started by: jdb on Nov 22nd, 2008, 12:42pm)

Title: Bot Interface Gamestate file
Post by jdb on Nov 22nd, 2008, 12:42pm
I need some help understanding the bot interface gamestate file.

When playing a game using the continuous tournament time control, 60s/5m/75/0/4h/4m the gamestate file does not report the current reserve time of the side to move properly.

For example if the bot is playing gold,
tcbreserve will show the proper reserve for the opponent,
tcwreserve is capped at 180.

Is tcturntime the max time allowed for one move? If so, then it should be ok to have tcwreserve report the full value even if it is over 180 seconds.


Title: Re: Bot Interface Gamestate file
Post by Janzert on Nov 22nd, 2008, 3:41pm
Interesting I had never noticed this since I basically always use min(reserve, turntime) for most everything.

Janzert

Title: Re: Bot Interface Gamestate file
Post by 99of9 on Nov 23rd, 2008, 1:21am

on 11/22/08 at 12:42:28, jdb wrote:
Is tcturntime the max time allowed for one move? If so, then it should be ok to have tcwreserve report the full value even if it is over 180 seconds.

Unfortunately changing this will break previous versions of gnobot.  Perhaps another solution is to pass a new variable with the full reserve time (tcwfullreserve, tcbfullreserve).

Title: Re: Bot Interface Gamestate file
Post by aaaa on Nov 23rd, 2008, 4:33am

on 11/22/08 at 12:42:28, jdb wrote:
For example if the bot is playing gold,
tcbreserve will show the proper reserve for the opponent,
tcwreserve is capped at 180.

This is exactly how things work with the game client, so this is most likely done so that the client always shows the hard time-per-move limit.


on 11/23/08 at 01:21:12, 99of9 wrote:
Perhaps another solution is to pass a new variable with the full reserve time (tcwfullreserve, tcbfullreserve).

Of course, since us humans would also like to be always able to see what our reserve beyond this is (and not just when it's not our turn), I'll add in an additional request to make the client also display the contents of such variables.

Title: Re: Bot Interface Gamestate file
Post by jdb on Nov 23rd, 2008, 5:51am

on 11/23/08 at 01:21:12, 99of9 wrote:
Perhaps another solution is to pass a new variable with the full reserve time (tcwfullreserve, tcbfullreserve).


Sounds good to me.

Title: Re: Bot Interface Gamestate file
Post by omar on Nov 26th, 2008, 6:38am

on 11/22/08 at 12:42:28, jdb wrote:
I need some help understanding the bot interface gamestate file.

When playing a game using the continuous tournament time control, 60s/5m/75/0/4h/4m the gamestate file does not report the current reserve time of the side to move properly.

For example if the bot is playing gold,
tcbreserve will show the proper reserve for the opponent,
tcwreserve is capped at 180.

Is tcturntime the max time allowed for one move? If so, then it should be ok to have tcwreserve report the full value even if it is over 180 seconds.


Yes, tcturntime is the max time allowed for one move. This parameter was not in the original time control specs and was introduced later. To allow older bots and UI clients to handle such time controls without any changes, I overloaded tc?reserve such that if the actual reserve is greater than tcturntime it is set to tcturntime. However, it does end up masking the amount of actual reserve time left when it is greater than tcturntime. If you need it I can add another parameter to show it.

Title: Re: Bot Interface Gamestate file
Post by jdb on Nov 26th, 2008, 7:13am

on 11/26/08 at 06:38:50, omar wrote:
Yes, tcturntime is the max time allowed for one move. This parameter was not in the original time control specs and was introduced later. To allow older bots and UI clients to handle such time controls without any changes, I overloaded tc?reserve such that if the actual reserve is greater than tcturntime it is set to tcturntime. However, it does end up masking the amount of actual reserve time left when it is greater than tcturntime. If you need it I can add another parameter to show it.

It would be nice information to have available, if its not too much trouble.
Thanks

Title: Re: Bot Interface Gamestate file
Post by omar on Dec 21st, 2008, 5:24pm
I added a tcwreserve2 and tcbreserve2 parameter that shows the actual reserve time even if tcwreserve and tcbreserve are less due to tcturntime being set.

Title: Re: Bot Interface Gamestate file
Post by jdb on Dec 22nd, 2008, 10:39am
I tried out the new parameters. A couple of  notes.

1) The gamestate file only contains the tcXreserve2 entry for the side to move. This is enough info, since the tcYreserve (for the other colour) contains the full reserve value.

2) The tcXreserve2 entry is always blank in the gamestate file.


Title: Re: Bot Interface Gamestate file
Post by omar on Dec 23rd, 2008, 8:08pm
Yes, currently the tcXreserve2 parameter is only set if tcXreserve will be modified. Would you like it to always be set?

Title: Re: Bot Interface Gamestate file
Post by jdb on Dec 23rd, 2008, 9:49pm
Yes, it should always be set. If it is set conditionally, it makes the gamestate file info harder to parse.

Title: Re: Bot Interface Gamestate file
Post by omar on Dec 24th, 2008, 7:39am
OK I've changed it to always be present.

Title: Re: Bot Interface Gamestate file
Post by jdb on Dec 24th, 2008, 8:29am
Now, tcbreserve2 and tcwreserve2 are always present, but both are still blank.



Code:

plycount=3
tcmove=60
lastmoveused=10
tcturns=0
wplayer=* bot_clueless
turn=w
tcreserve=300
starttime=1230135868
t=111685
wused=1
rated=1
e=bot_clueless
barrived=1230135867
gameId=684962776
timeonserver=1230135989
postal=0
moves=1w Ee2 Md2 Hg2 Hb2 Df2 De1 Cd1 Cc2 Ra2 Rh2 Ra1 Rb1 Rc1 Rf1 Rg1 Rh1%131b ha7 db7 cc7 md7 ee7 cf7 dg7 hh7 ra8 rb8 rc8 rd8 re8 rf8 rg8 rh8%132w Ee2n Ee3n Ee4n Ee5n%132b md7s cc7e%133w Hg2n md6w mc6x Ee6w Ed6e%133b cd7w%134w
tcwreserve2=
s=w
event=Casual game
tableId=111685
tcgame=120
roomId=3
lastmovereserve=377
tcmax=0
title=Game Number: 111685
wpresent=1230127704
warrived=1230127704
tcwreserve=180
wrating=1887
movenum=4w
tcbreserve2=
r=w
position=4w %13 +-----------------+%138| r r r r r r r r |%137| h d c   e c d h |%136|     X   E X     |%135|                 |%134|                 |%133|     X     X H   |%132| R H C M   D   R |%131| R R R C D R R R |%13 +-----------------+%13   a b c d e f g h%13
tcgamenow=121
auth=083389104696
wstartmove=1230135988
timecontrol=R 60s/5m/75/0/4h/4m
tcbreserve=415
tctotal=14400
brating=1996
bplayer=* jdb
tcpercent=75
creattime=1230127704
chat=g 1g: This bot uses the full search%13
lastchange=12
tcturntime=240
bused=10
cts=1230127704
bpresent=1230135867
--END--

Title: Re: Bot Interface Gamestate file
Post by omar on Jan 1st, 2009, 10:11am
Sorry, typo in the variable name it was being set from. Should be OK now.



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