Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Bot Development >> Arimaa Sample Bot
(Message started by: BlackKnight on Sep 7th, 2005, 11:39am)

Title: Arimaa Sample Bot
Post by BlackKnight on Sep 7th, 2005, 11:39am
Yesterday I attended a more than two hours talk by Richard Stallman, father of the  Free Software Foundation (free - not gratis!) and the GNU Project (http://www.gnu.org). ("Variants of the GNU operating system, which use the kernel Linux, are now widely used; though these systems are often referred to as “Linux”, they are more accurately called GNU/Linux systems.")

I (more precisely bot_bash) also tried to beat Arimazilla yesterday. (Since then it disappeared - kidding!)

How are those two things related?
Thank you, Don and Omar, for providing a free (and gratis) Sample Bot!

I want to exercise freedom 3 (GNU Project):
"You have the freedom to distribute modified versions of the program, so that the community can benefit from your improvements."
Not the whole program though, sorry!  ;)
But I tried to implement 3 step moves, and I found quite some difficulties. Maybe somebody also wants to share better solutions or somebody finds those hints helpful.

  • If the search has reached 3 steps I make another recursive call:
    sc = -srch( &cur,  -beta,  -alpha, depth-mvlist[i].steps-1,
    // the -1 is a trick but it seems to work
    ssteps+mvlist[i].steps, mvlist[i], &wpv, ply_of_search,         ctm^1, true);
    // the last flag (true) indicates that the function has been called after 3 steps (instead of originally only 4).
  • The flag step3down is used here:
       if (!step3down) {
           cur.trans[add].tkey = psig;
           cur.trans[add].age = age[ply_of_search];
       }        
    otherwise I have problems filtering out repeated positions.
    Actually, too many will be filtered out.
  • I'm a Pascal "native-speaker". I have trouble with C-strings. So the biggest problem for me(!) was, to get really only those 3 steps as output of the program.
    Finally, I included
    int    tcol:2;  // color of the player who moved that piece
    into struct step_t, so that I later easily only generate the notation of the steps that have been made by my bot.
    Otherwise it always gave me 4 steps as output, and I didn't know how to fix it.

Title: Re: Arimaa Sample Bot
Post by omar on Sep 10th, 2005, 5:58am
I had modified Don's sample bot to create a random bot. This random bot generates moves at all step levels: 1, 2, 3 and 4. You can find the code for it in the matchOffline kit. It is called bot_r0. This bot generates all unique positions that can be acheived from a given position and randomly selects one of them. If the selected move does not change the board position it is rejected and another move is selected. Maybe the source of that program might help.



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