BlackKnight
Forum Guru
Arimaa player #695
Gender:
Posts: 98
|
|
Arimaa Sample Bot
« on: Sep 7th, 2005, 11:39am » |
Quote Modify
|
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.
|