Welcome, Guest. Please Login or Register.
Nov 24th, 2024, 5:14pm

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « New Bot caretaker have questions... »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   New Bot caretaker have questions...
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: New Bot caretaker have questions...  (Read 1245 times)
unic
Forum Guru
*****



Arimaa player #1878

   


Gender: male
Posts: 63
New Bot caretaker have questions...
« on: Apr 15th, 2006, 5:16pm »
Quote Quote Modify Modify

Hi,
 
I've got my Bot up and working (though playing extremely stupid), and have a couple of questions:
 
a/ Is there a way for my bot to display information while thinking, without the perl-script interpreting it as a move?  E.g., I would like to display depth, nodes/second, PV, evaluation, etc. - would make it a lot easier to try to debug or improve things.
 
b/ Is there a way for my bot to play against the bots in the botladder, starting at the bottom?  Otherwise, there usually does not seem to be a weak bot logged in, as far as I've seen.
IP Logged
Ryan_Cable
Forum Guru
*****



Arimaa player #951

   


Gender: male
Posts: 138
Re: New Bot caretaker have questions...
« Reply #1 on: Apr 15th, 2006, 5:41pm »
Quote Quote Modify Modify

I’m not sure if there is a more efficient way, but you can start most bots by clicking on the Arimaa Bots link on the right of the Gameroom, then the Bots Available to Play link at the top of that page.  Pick out the bot you want, and click on its Play link.  Finally, pick the color you want it to play, and click the Start Bot button.  The bot will then show up in the Gameroom with a game for your bot to join.
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: New Bot caretaker have questions...
« Reply #2 on: Apr 15th, 2006, 5:58pm »
Quote Quote Modify Modify

For question a)
 
Clueless writes a bunch of info to a log file while it is searching. I look at the file with a text editor. This also makes it easier to recreate situations that occurred in a game. Anything written to stdout is digested by the perl script.
 
For question b)
 
Ryan's method is the only way I know. I would recommend starting against shallowblue and then trying arimaazilla. They both move within a few seconds, so the games don't take too long.
 
IP Logged
unic
Forum Guru
*****



Arimaa player #1878

   


Gender: male
Posts: 63
Re: New Bot caretaker have questions...
« Reply #3 on: Apr 15th, 2006, 6:03pm »
Quote Quote Modify Modify

on Apr 15th, 2006, 5:58pm, jdb wrote:
For question a)
 
Clueless writes a bunch of info to a log file while it is searching. I look at the file with a text editor. This also makes it easier to recreate situations that occurred in a game. Anything written to stdout is digested by the perl script.

There is no way around this?  I would really like to be able to see what my bot is thinking, live, while it is playing a game...
IP Logged
unic
Forum Guru
*****



Arimaa player #1878

   


Gender: male
Posts: 63
Re: New Bot caretaker have questions...
« Reply #4 on: Apr 15th, 2006, 6:04pm »
Quote Quote Modify Modify

Oh, and thanks to Ryan for telling me how to start a bot - ShallowBlue is a bit less intimidating than Arimaanator.
IP Logged
99of9
Forum Guru
*****




Gnobby's creator (player #314)

  toby_hudson  


Gender: male
Posts: 1413
Re: New Bot caretaker have questions...
« Reply #5 on: Apr 15th, 2006, 6:08pm »
Quote Quote Modify Modify

on Apr 15th, 2006, 6:03pm, unic wrote:

There is no way around this?  I would really like to be able to see what my bot is thinking, live, while it is playing a game...

I use two methods to get around this.
 
1) write messages to stderr - they will be dispersed throughout the stdout output, so you will see them live
 
2) write messages to a log file, and in a separate window, tail -f that log file.  
 
Admittedly this 2nd is a linux command, so windows may not have an equivalent.  But if you're a true blue windows programmer, you can probably make a new "window" come up with your output Wink.
IP Logged
unic
Forum Guru
*****



Arimaa player #1878

   


Gender: male
Posts: 63
Re: New Bot caretaker have questions...
« Reply #6 on: Apr 15th, 2006, 7:20pm »
Quote Quote Modify Modify

on Apr 15th, 2006, 6:08pm, 99of9 wrote:

1) write messages to stderr - they will be dispersed throughout the stdout output, so you will see them live

How ugly!  But it works :)  I expect I shall be using this a lot.
Quote:

2) write messages to a log file, and in a separate window, tail -f that log file.  
 
Admittedly this 2nd is a linux command, so windows may not have an equivalent.  But if you're a true blue windows programmer, you can probably make a new "window" come up with your output ;-).

I'm afraid I'm not a true windows programmer - most of my programs are compiled as console applications ;)
 
... either way, seeing some output from my program, it's plain I have a major bug somewhere... (where it played the first step according to the search, but for the remaining steps just played the first move generated) but I feel less that I am fumbling in the dark trying to find out now, with the possibility of seeing some output.
 
It is way late here though, so trying to fix it will have to wait until tomorrow...
IP Logged
unic
Forum Guru
*****



Arimaa player #1878

   


Gender: male
Posts: 63
Re: New Bot caretaker have questions...
« Reply #7 on: Apr 15th, 2006, 7:29pm »
Quote Quote Modify Modify

Oh, and while using stderr works...
 
I hereby petition for some capable Perl hacker (which rules me out - I know nothing about Perl) to extend the bot perl-script so that it treats any line beginning with a certain character (perhaps #) as a comment, and ignores it...
 
Not sure how complicated that would be in Perl - but seems to me it shouldn't be too difficult to add.   And it would solve the whole issue of not being able to write data to stdout without the Perl-script trying to interpret it as a move.
 
Good night.
 
Tomorrow's goal: have Fairy actually trying to win (or at least capture/defend material) instead of just shuffling rabbits left and right.
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: New Bot caretaker have questions...
« Reply #8 on: Apr 16th, 2006, 1:00am »
Quote Quote Modify Modify

Quote:
There is no way around this?  I would really like to be able to see what my bot is thinking, live, while it is playing a game...

 
A decent text editor, like TextPad, (free via google) will automatically reload the log file in real time.
IP Logged
unic
Forum Guru
*****



Arimaa player #1878

   


Gender: male
Posts: 63
Re: New Bot caretaker have questions...
« Reply #9 on: Apr 16th, 2006, 5:17am »
Quote Quote Modify Modify

on Apr 15th, 2006, 7:29pm, unic wrote:

Tomorrow's goal: have Fairy actually trying to win (or at least capture/defend material) instead of just shuffling rabbits left and right.

Mission accomplished - now that I could actually get output and get on with debugging, a few large bugs were easily found, and in today's first game, Fairy beat ShallowBlue :)
IP Logged
unic
Forum Guru
*****



Arimaa player #1878

   


Gender: male
Posts: 63
Re: New Bot caretaker have questions...
« Reply #10 on: Apr 29th, 2006, 5:53pm »
Quote Quote Modify Modify

Fairy is progressing well - working mainly on improving search speed right now.  Have too many ideas for evaluation, so I'm afraid that once I start seriously looking at that, I won't get around to working on search... so want to get a reasonable search speed first.
 
Random output from Fairy searching the start position:
Code:

Searching position:
Move 2,  Step 0,  Gold at move.
 +-----------------+
8| r r r r r r r r |
7| h c d e m d c h |
6| . . - . . - . . |
5| . . . . . . . . |
4| . . . . . . . . |
3| . . - . . - . . |
2| H D C M E C D H |
1| R R R R R R R R |
 +-----------------+
   a b c d e f g h
Hashkey: 798B31C67F57B17B
 
Remaining time: 115.00
Allocated time:  46.00
    Depth  Value     Nodes     Evals   Time PV
     5........     50    2    1   0.00 Ha2n
     5........    250    3    2   0.00 Db2n
     5........    400    5    4   0.00 Md2n
     5........    850    6    5   0.00 Ee2n
===  5/ 1.0/ 1    850    9    8   0.00 Ee2n
    10........    850    2    1   0.00 Ee2n
=== 10/ 1.0/ 1    850    9    8   0.00 Ee2n
    15........   1060   17   15   0.00 Ee2n Md2n
=== 15/ 2.1/ 4   1060   95   88   0.00 Ee2n Md2n
    20........   1060   17   15   0.00 Ee2n Md2n
=== 20/ 2.1/ 4   1060  117  108   0.00 Ee2n Md2n
    25........    950  219  204   0.01 Ee2n Ha2n Ha3e
=== 25/ 3.0/ 4    950 1211 1130   0.01 Ee2n Ha2n Ha3e
    30........    950  236  220   0.01 Ee2n Ha2n Ha3e
=== 30/ 3.1/ 4    950 1593 1486   0.03 Ee2n Ha2n Ha3e
    35........    910 3254 3066   0.08 Ee2n Ha2n Ha3e Md2n
=== 35/ 4.0/ 4    910     17619     16588   0.27 Ee2n Ha2n Ha3e Md2n
    40........    910 3809 3575   0.30 Ee2n Ha2n Ha3e Md2n
=== 40/ 4.0/ 5    910     24584     23053   0.45 Ee2n Ha2n Ha3e Md2n
    45........    260 6641 3584   0.48 Ee2n Ha2n Ha3e Md2n ed7s
=== 45/ 4.6/ 5    260     39532     23065   0.77 Ee2n Ha2n Ha3e Md2n ed7s
    50........    260 7374 3593   0.80 Ee2n Ha2n Ha3e Md2n ed7s
=== 50/ 5.0/ 8    260     47909     23776   1.00 Ee2n Ha2n Ha3e Md2n ed7s
    55........     50     10297 3687   1.03 Ee2n Ha2n Ha3e Md2n ed7s me7s
=== 55/ 5.6/ 8     50     63008     23928   1.22 Ee2n Ha2n Ha3e Md2n ed7s me7s
    60........    110     12284 4843   1.25 Ee2n Md2n (pass) ed7s cg7s hh7s
=== 60/ 6.0/ 8    110     73212     25265   1.42 Ee2n Md2n (pass) ed7s cg7s hh7s
    65........    160     16779 6405   1.48 Ee2n Md2n Ha2n Ha3e ed7s cg7s hh7s
=== 65/ 6.6/ 8    160     89533     26610   1.66 Ee2n Md2n Ha2n Ha3e ed7s cg7s hh7s
    70........    160     16130 5096   1.72 Ee2n Md2n Ha2n Ha3e ed7s cg7s hh7s
=== 70/ 7.0/ 8    160     97278     25661   1.92 Ee2n Md2n Ha2n Ha3e ed7s cg7s hh7s
    75........    200     35529     20728   2.13 Ee2n Md2n Ha2n Ha3e ed7s cg7s hh7s me7s
=== 75/ 7.7/ 8    200    128772     41327   2.33 Ee2n Md2n Ha2n Ha3e ed7s cg7s hh7s me7s
    80........    150     88626     70804   2.88 Ee2n Md2n Dg2n Hh2n ed7s me7s (pass) Ee3n
=== 80/ 8.7/10    150    327815    233125   4.23 Ee2n Md2n Dg2n Hh2n ed7s me7s (pass) Ee3n
    85........    140    154343    102091   5.28 Ee2n Md2n Dg2n Re1n ed7s me7s ha7s ha6e Cf2n
=== 85/ 8.9/12    140    473374    327407   7.17 Ee2n Md2n Dg2n Re1n ed7s me7s ha7s ha6e Cf2n
    90........    100    274202    199214   8.77 Ee2n Md2n Dg2n Ee3n ed7s me7s ha7s ha6e Hh2n
=== 90/ 9.5/12    100   1019664    827965  13.75 Ee2n Md2n Dg2n Ee3n ed7s me7s ha7s ha6e Hh2n
    95........     90   1537540   1354628  24.45 Ee2n Md2n Ee3n Ee4n ed7s me7s me6e mf6e Dg2n Ee5w
~~~ 95/10.1/12     90   4420000   4033753  46.05 Ee2n Md2n Ee3n Ee4n ed7s me7s me6e mf6e Dg2n Ee5w

Slightly garbled - I think the forum is eating some of my whitespace or inserting extra (or doing some weird replacement with tabs)... not sure which.
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.