Welcome, Guest. Please Login or Register.
May 19th, 2024, 4:51am

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Bot Interface Gamestate file »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   Bot Interface Gamestate file
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Bot Interface Gamestate file  (Read 1064 times)
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Bot Interface Gamestate file
« on: Nov 22nd, 2008, 12:42pm »
Quote Quote Modify Modify

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.
 
IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: Bot Interface Gamestate file
« Reply #1 on: Nov 22nd, 2008, 3:41pm »
Quote Quote Modify Modify

Interesting I had never noticed this since I basically always use min(reserve, turntime) for most everything.
 
Janzert
IP Logged
99of9
Forum Guru
*****




Gnobby's creator (player #314)

  toby_hudson  


Gender: male
Posts: 1413
Re: Bot Interface Gamestate file
« Reply #2 on: Nov 23rd, 2008, 1:21am »
Quote Quote Modify Modify

on Nov 22nd, 2008, 12:42pm, 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).
IP Logged
aaaa
Forum Guru
*****



Arimaa player #958

   


Posts: 768
Re: Bot Interface Gamestate file
« Reply #3 on: Nov 23rd, 2008, 4:33am »
Quote Quote Modify Modify

on Nov 22nd, 2008, 12:42pm, 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 Nov 23rd, 2008, 1:21am, 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.
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: Bot Interface Gamestate file
« Reply #4 on: Nov 23rd, 2008, 5:51am »
Quote Quote Modify Modify

on Nov 23rd, 2008, 1:21am, 99of9 wrote:

Perhaps another solution is to pass a new variable with the full reserve time (tcwfullreserve, tcbfullreserve).

 
Sounds good to me.
IP Logged
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Bot Interface Gamestate file
« Reply #5 on: Nov 26th, 2008, 6:38am »
Quote Quote Modify Modify

on Nov 22nd, 2008, 12:42pm, 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.
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: Bot Interface Gamestate file
« Reply #6 on: Nov 26th, 2008, 7:13am »
Quote Quote Modify Modify

on Nov 26th, 2008, 6:38am, 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
IP Logged
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Bot Interface Gamestate file
« Reply #7 on: Dec 21st, 2008, 5:24pm »
Quote Quote Modify Modify

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.
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: Bot Interface Gamestate file
« Reply #8 on: Dec 22nd, 2008, 10:39am »
Quote Quote Modify Modify

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.
 
IP Logged
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Bot Interface Gamestate file
« Reply #9 on: Dec 23rd, 2008, 8:08pm »
Quote Quote Modify Modify

Yes, currently the tcXreserve2 parameter is only set if tcXreserve will be modified. Would you like it to always be set?
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: Bot Interface Gamestate file
« Reply #10 on: Dec 23rd, 2008, 9:49pm »
Quote Quote Modify Modify

Yes, it should always be set. If it is set conditionally, it makes the gamestate file info harder to parse.
IP Logged
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Bot Interface Gamestate file
« Reply #11 on: Dec 24th, 2008, 7:39am »
Quote Quote Modify Modify

OK I've changed it to always be present.
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: Bot Interface Gamestate file
« Reply #12 on: Dec 24th, 2008, 8:29am »
Quote Quote Modify Modify

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--
IP Logged
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Bot Interface Gamestate file
« Reply #13 on: Jan 1st, 2009, 10:11am »
Quote Quote Modify Modify

Sorry, typo in the variable name it was being set from. Should be OK now.
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

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