Welcome, Guest. Please Login or Register.
Apr 20th, 2024, 12:17am

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Arimaa Engine Interface (AEI) »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   Arimaa Engine Interface (AEI)
« Previous topic | Next topic »
Pages: 1 ... 4 5 6 7  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Arimaa Engine Interface (AEI)  (Read 21577 times)
rbarreira
Forum Guru
*****



Arimaa player #1621

   


Gender: male
Posts: 605
Re: Arimaa Engine Interface (AEI)
« Reply #75 on: Mar 16th, 2011, 7:11pm »
Quote Quote Modify Modify

Since OpFor, clueless and briareus all use bot_threads to set the number of search threads, maybe it wouldn't be a bad idea to have this option name as an AEI standard (it seems as relevant to have a standard for it as it is to have the bot_hash standard).
« Last Edit: Mar 16th, 2011, 7:11pm by rbarreira » IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: Arimaa Engine Interface (AEI)
« Reply #76 on: Mar 17th, 2011, 1:38pm »
Quote Quote Modify Modify

Yep, this is probably a good idea. The only reason I didn't include it before was that it seems a fair number of chess engines use separate processes instead of threads. In which case it seemed like a bit of a misnomer.
 
But I guess it is the best common name, and I'll try to include a description in the spec that gives the more general usage (i.e. basically that it should set the limit on cores actively used).
 
Janzert
IP Logged
rbarreira
Forum Guru
*****



Arimaa player #1621

   


Gender: male
Posts: 605
Re: Arimaa Engine Interface (AEI)
« Reply #77 on: Mar 28th, 2011, 11:36am »
Quote Quote Modify Modify

When testing briareus with a postal game, for the first move (after the setup) I had to start it manually with the game id, the postal controller claimed that there was no game with the bot's turn to move.
 
I printed the game variables and it seemed that g['turn'] was an empty string which of course failed the "g['turn'] == g['side']" test.
 
In the next move everything was fine and the postal controller worked as expected.
 
I don't know if this was the server or some script's fault. Did you ever experience this problem in postal games?
« Last Edit: Mar 28th, 2011, 11:42am by rbarreira » IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: Arimaa Engine Interface (AEI)
« Reply #78 on: Mar 28th, 2011, 12:07pm »
Quote Quote Modify Modify

Hmm, I don't recall ever seeing that before. I'm also surprised you were able to play a turn by running gameroom.py manually, since it also has a similar check*. I wonder if maybe the server happened to return the correct state when you ran gameroom.py directly?
 
Janzert
 
* line 278 of the latest gameroom.py
IP Logged
rbarreira
Forum Guru
*****



Arimaa player #1621

   


Gender: male
Posts: 605
Re: Arimaa Engine Interface (AEI)
« Reply #79 on: Mar 28th, 2011, 1:44pm »
Quote Quote Modify Modify

I tried to run the postal controller many times so it didn't seem like a random bug.
 
I think I just managed to reproduce it:
 
1- Started a postal game myself as silver (bot will be gold)
2- Made bot join the game with ./gameroom.py play <game_id>
3- Bot sends gold setup.
4- I send silver setup.
5- Bot starts thinking on 2g.
6- CTRL+C to interrupt gameroom.py (checked that bot or gameroom.py wasn't running afterwards)
7- Started postal_controller.py several times, always got this output (including debug print I added):
 
Quote:
{'rated': '1', 'schts': '0000000000', 'createdts': '1301337301', 'turn': '', 'timecontrol': '1d/60d/100/0/300d/21d', 'player': 'rbarreira', 'plycount': '0', 'gid': '222602', 'turnts': '0000000000', 'postal': '1', 'side': 'w'}
Found 1 games with 1 postal games and 0 on my turn.
No postal games with a turn found, sleeping.

 
If, instead, step 6 is done before step 4, running postal_controller.py seems to work fine!
 
I just tried the steps above twice and they seem to reproduce the bug consistently. Running gameroom.py on the game manually gets the bot thinking on the move in any case.
 
Fortunately this use case is probably not very common since postal games are usually started asynchronously, so this is probably not a critical bug (I'm suspecting the server might be at fault though?).
« Last Edit: Mar 28th, 2011, 1:54pm by rbarreira » IP Logged
Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: Arimaa Engine Interface (AEI)
« Reply #80 on: Mar 28th, 2011, 5:40pm »
Quote Quote Modify Modify

I think I've seen before that server seems to lag behind in updating the turn state for games listed in the postal games list. I have a feeling the game state the postal controller is looking at is from the same source on the server. I wonder if you leave the postal controller running does it see the turn after 10-15 minutes?
 
Janzert
IP Logged
rbarreira
Forum Guru
*****



Arimaa player #1621

   


Gender: male
Posts: 605
Re: Arimaa Engine Interface (AEI)
« Reply #81 on: Mar 28th, 2011, 6:12pm »
Quote Quote Modify Modify

on Mar 28th, 2011, 5:40pm, Janzert wrote:
I think I've seen before that server seems to lag behind in updating the turn state for games listed in the postal games list. I have a feeling the game state the postal controller is looking at is from the same source on the server. I wonder if you leave the postal controller running does it see the turn after 10-15 minutes?
 
Janzert

 
Yeah, on the second try (after 5 minutes) it started the bot, so no big deal especially since this is already rare enough...
 
I also noticed that I had to try twice this time to reproduce the bug, so there's probably some timing/scheduled job thing at play here.
 
Thanks for the help!
IP Logged
Hippo
Forum Guru
*****




Arimaa player #4450

   


Gender: male
Posts: 883
Re: Arimaa Engine Interface (AEI)
« Reply #82 on: May 16th, 2011, 3:14am »
Quote Quote Modify Modify

I am planning to change gameroom.py script for myself to allow to connect to open games without need of explicit gamenumber or opponent name. Of course it would be annoing for other players not wanting to be played by the bot so there would be automatic white/black list of opponents to join this way.
 
I think about resignation on bot's turn signalling put player on the black list, while resignation on player turn means put player on white list (remove me from black list).
 
This allows even players on black list to set their own prefered time and be played by bot ... by joining the bot, resigning on players turn and starting open game on prefered time control.
Expecting the bot is run in loop it joins the game ... .
 
I expect this could be usefull not only for my bot.
I am new to python, but I hope it would not be too hard to incorporate it there.  
 
@Janzert: I expect you are not planning to code such thing, but I hope you don't mind me to do such changes.
IP Logged

Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: Arimaa Engine Interface (AEI)
« Reply #83 on: May 16th, 2011, 4:01am »
Quote Quote Modify Modify

You're certainly allowed to change the scripts provided with AEI however you want. I just may or may not incorporate those changes back into the main distribution. Smiley
 
Btw, for the feature you're talking about above, I think it would be safest to just use a whitelist and then add or remove players to it with the method you mention. So the bot would never join an open game for a player that hadn't made an explicit action causing it. Although even then it might be a little risky that someone would still get upset if they didn't understand the resignation signalling method being used.
 
Janzert
IP Logged
Hippo
Forum Guru
*****




Arimaa player #4450

   


Gender: male
Posts: 883
Re: Arimaa Engine Interface (AEI)
« Reply #84 on: May 16th, 2011, 5:21am »
Quote Quote Modify Modify

Of course I expect mentioning the resign signalling in the game chat.
But you are right white list seems better.
 
... and I must think about bots.
 
Black list strategy for bot's seems be better ... when no open game find during setup ... bot creates its own open game and waits.
 
There is low probability of colision with the game opened for human (if human connects in short term).
 
And this allows anybody to invite the botA for botB just by opening botB and (if botA game remains open ... himself joining botA and resigning).
 
There would be only problem to invite such bot when there is another open game so the bot could chose the other. So if more bot's use this "always ready" strategy one should join those which should not be connected to swith it temporarily off.
 
Hmmm, it may be difficult to stop pair of "always ready" bots from playing each other (from outside).
 
May joining white list humans first than join bots would be preferable to allow easy break for white listed humans.
 
Omar@ would you mind traffic caused by several "always ready" bots?
« Last Edit: May 16th, 2011, 5:52am by Hippo » IP Logged

Hippo
Forum Guru
*****




Arimaa player #4450

   


Gender: male
Posts: 883
Re: Arimaa Engine Interface (AEI)
« Reply #85 on: Apr 13th, 2012, 3:05am »
Quote Quote Modify Modify

I want to make my bot to connect to open bot game with bot closest in rankings to my bot as possible.
But I don't know how to get bot's rating before sitting to the table.
Does anybody know how to get the ratings ... preferably from python?
Thanks
IP Logged

Nombril
Forum Guru
*****



Arimaa player #4509

   
Email

Gender: male
Posts: 292
Re: Arimaa Engine Interface (AEI)
« Reply #86 on: May 2nd, 2012, 10:05pm »
Quote Quote Modify Modify

Just a shot in the dark to see if anyone has some suggestions for where to look.  John and I will be trying again in the morning.
 
roundrobin.py is not communicating with our new bot.
 
We were able to run bot_hippo locally (windows environment) with roundrobin.py and play some games locally (against human and simple bot).  So I'm (relatively) confident the infrastructure is sound.
 
We have written a simplified bot, to included only what we understand.  We can run our bot directly (in Netbeans), typing the server commands, and getting correct echos, changes to board state, etc.)  But when we update roundrobin.py to use this new bot, we get a timeout that aeiok wasn't received.
 
It is still very murky to me how to debug in this situation when one language is calling another.  Any suggestions for a path we might have missed?  Or some other settings?
 
Edit: Here are the roundrobin.py settings... Am I correct we can have multiple bots listed here like this?  http://pastebin.com/xQCvUN5a
« Last Edit: May 2nd, 2012, 10:37pm by Nombril » IP Logged

Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: Arimaa Engine Interface (AEI)
« Reply #87 on: May 2nd, 2012, 11:21pm »
Quote Quote Modify Modify

First thing that comes to mind is, make sure you're flushing stdout after sending the bot output.
 
Janzert
IP Logged
Nombril
Forum Guru
*****



Arimaa player #4509

   
Email

Gender: male
Posts: 292
Re: Arimaa Engine Interface (AEI)
« Reply #88 on: May 3rd, 2012, 8:23am »
Quote Quote Modify Modify

Thanks for the quick reply Janzert.
 
Starting fresh today I was able to find the problem.
I had been running via starting the class, I tried running with the jar file (netbean's "suggestion" to run the program) and it worked.
Quote:
#cd \Users\Eric\Dropbox\Arimaa\the-best-arimaa-bot\bot_jae\build\classes
#java bot_jae/Bot_jae
#above didn't run will try this:
java -jar "C:\Users\Eric\Dropbox\Arimaa\the-best-arimaa-bot\bot_jae\dist\bot_jae.j ar"

 
I had a poor description of the error last night - running roundrobin from python was giving me the timeout error.  This morning I ran it from compiled python/windows explorer... and it gave me different output - that it couldn't find the bot.
IP Logged

Hippo
Forum Guru
*****




Arimaa player #4450

   


Gender: male
Posts: 883
Re: Arimaa Engine Interface (AEI)
« Reply #89 on: May 6th, 2012, 7:15am »
Quote Quote Modify Modify

on May 2nd, 2012, 10:05pm, Nombril wrote:

We were able to run bot_hippo locally (windows environment) with roundrobin.py.

 
Well Smiley so it works at least for one other people.
... I expect I could use the jar calling method as well ... .
IP Logged

Pages: 1 ... 4 5 6 7  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.