Welcome, Guest. Please Login or Register.
Apr 30th, 2024, 4:58am

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « bot_bash »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   bot_bash
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: bot_bash  (Read 1316 times)
BlackKnight
Forum Guru
*****



Arimaa player #695

   


Gender: male
Posts: 98
bot_bash
« on: Sep 8th, 2005, 2:44pm »
Quote Quote Modify Modify

I just tried some new ideas resulting in bot_bash.
The name leaves much room for speculation Wink (see commented games), but the implementation is very simple (too simple to be good enough for stronger bots so far).
 
It's a 1 ply bot. (I added on some kind of "goal-search".)
It tries to follow a fixed strategy instead of performing a deep search through all possible moves. However, the 1 ply uses the typical alpha-beta search. If the strategy fails, it does not know what to do anymore and obviously will lose the game soon after.
 
It's evaluation function scores the progress of the strategy, nothing else. For example for bot_shallowblue:
   // bonus for advancing the rabbit
   if (p->bd[c][RABBIT] & rot_RANK_8[c]) value = WIN_SCORE;    
   else if (p->bd[c][RABBIT] & rot_RANK_6[c] & rot_A_FILE[c]) value += 20;
   else if (p->bd[c][RABBIT] & rot_RANK_5[c] & rot_A_FILE[c]) value += 15;
   else if (p->bd[c][RABBIT] & rot_RANK_4[c] & rot_A_FILE[c]) value += 10;
   else if (p->bd[c][RABBIT] & rot_RANK_3[c] & rot_A_FILE[c]) value +=  5;
   // more bonus for advancing the elephant
   if (p->bd[c][ELEPHANT] & rot_RANK_7[c] & rot_B_FILE[c]) value += 35;
   else if (p->bd[c][ELEPHANT] & rot_RANK_6[c] & rot_B_FILE[c]) value += 40;
   else if (p->bd[c][ELEPHANT] & rot_RANK_5[c] & rot_B_FILE[c]) value += 35;
   else if (p->bd[c][ELEPHANT] & rot_RANK_4[c] & rot_B_FILE[c]) value += 30;
   else if (p->bd[c][ELEPHANT] & rot_RANK_3[c] & rot_B_FILE[c]) value += 25;
   // blocking enemy pieces
   if (p->bd[c^1][0] & rot_RANK_8[c] & rot_A_FILE[c]) value -= 13;
   if (p->bd[c^1][0] & rot_RANK_8[c] & rot_B_FILE[c]) value -= 11;
   if (p->bd[c^1][0] & rot_RANK_7[c] & rot_A_FILE[c]) value -= 12;
   if (p->bd[c^1][0] & rot_RANK_7[c] & rot_B_FILE[c]) value -= 10;
   if (p->bd[c^1][0] & rot_RANK_6[c] & rot_A_FILE[c]) value -= 11;
   if (p->bd[c^1][0] & rot_RANK_6[c] & rot_B_FILE[c]) value -=  9;
   if (p->bd[c^1][0] & rot_RANK_5[c] & rot_A_FILE[c]) value -= 10;
   if (p->bd[c^1][0] & rot_RANK_5[c] & rot_B_FILE[c]) value -=  8;
   if (p->bd[c^1][0] & rot_RANK_4[c] & rot_A_FILE[c]) value -=  9;
 
So this is all hardcoded. Fritzlein was hoping
"that bot_bash learned to bash ShallowBlue and Arimaalon, not by being hardcoded, but by studying how humans have set fastest win records in the past. Wouldn't that be cool?"
 
I agree, this would be really cool. And after trying hard to implement a much more complex strategy against bomb2005blitz (that is - in its fixed form - not quite successful without perfect "cooperation" of bomb2005blitz, and not all useful for any other bot or even other instances of bomb itself) I also would prefer an automated extraction of plans from the games!  Cool
 
Finally, Jeff suggested the following:
"Belbo's games often have the theme of driving a rabbit through. Belbo seems to drag some enemy rabbits up the board, removing them from the desired corner. He also likes to position his pieces, so the stronger enemy pieces have a tough time getting into the corner."
So this might be a more general plan being useful against different bots that I like much more than my specific plans against particular bots.
IP Logged
BlackKnight
Forum Guru
*****



Arimaa player #695

   


Gender: male
Posts: 98
Re: bot_bash
« Reply #1 on: Nov 30th, 2005, 12:31am »
Quote Quote Modify Modify

Just in case you might be interested why I have 3 bots with different names, here's a short explanation:
 
Bash existed only to try out some very restricted bashing strategies. All this was done using the eval function (see above), and generating brute force all possible moves for only a very restricted number of pieces, and only 4 steps look-ahead. Plus a brute force goal search.
 
His brother bot_V:
I really loved the movie Short Circuit (starring Number 5) but V should actually be pronounced as "vee" and the whole name is related to Botvinnik, because he published some ideas on "human like" searching in chess. So about one year ago I tried to implement some ideas like capturing a piece, attacking a piece, defending/attacking a trap as a move of up to four steps instead of generating all possible moves in a certain position. Of course those several hundred (buggy) lines of code do by far not cover all cases, which you can easily see in the games played, and even worse generate impossible moves sometimes! Wink Having such restricted possibilities to move botV reaches 16 steps on average (also because his eval function nearly only considers whether he can win material), but misses very important branches in the tree that usually make him play even worse than Loc who only reaches 10 steps at most.
 
So Loc (for location: whether a piece is allowed to move in a turn is dependent on the location of itself and the opponents pieces) generates all possible moves for those pieces, and tries to cover his slowness with a very long and messy eval function that makes him even slower!? Wink
IP Logged
Fritzlein
Forum Guru
*****



Arimaa player #706

   
Email

Gender: male
Posts: 5928
Re: bot_bash
« Reply #2 on: Nov 30th, 2005, 9:27am »
Quote Quote Modify Modify

Thanks for the explanation of how the names of your bots relate to their respective structures.  I had just assumed that "Loc" stood for loco, i.e. crazy.  Smiley
IP Logged

BlackKnight
Forum Guru
*****



Arimaa player #695

   


Gender: male
Posts: 98
Re: bot_bash
« Reply #3 on: Nov 30th, 2005, 10:18am »
Quote Quote Modify Modify

on Nov 30th, 2005, 9:27am, Fritzlein wrote:
"Loc" stood for loco, i.e. crazy.  Smiley

Yes, those names leave much room for interpretation, and as usual your thought fits very well!   Cheesy
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.