Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Bot Development >> Trap evaluation in Bomb
(Message started by: fotland on Feb 11th, 2007, 7:10pm)

Title: Trap evaluation in Bomb
Post by fotland on Feb 11th, 2007, 7:10pm
First, I never evaluate a position in the middle of a push.  Since the next step is forced, I always extend the search one ply instead of evaluating when a piece has just been pushed.

Notation: x-empty, e-enemy, the side doing the capture, f-friend, the piece being captured, p a spot where a piece can be pulled, w-weak enemy piece that has to get out of the way.  A capital letter indicates the trap location.  The patterns are presented in a line but can be matched bent.

In all cases the enemy piece doing the capture might need to be unfrozen first.  This can add 0, 1, or 2 steps (uf).

In many cases an enemy piece can be on the trap and must move off first (on).  This can add 0, 1, or 2 steps.  1 step if an enemy can move away.  2 steps to push away a friend.  It could be more, but I stop analyzing at 2 steps.

Traps with zero friendly pieces adjacent:

Xef 4 + uf + on, and check that e can move sideways or move onto trap without suicide.

Xwfe - close e must move out of the way.  5 + uf + on, and check that close e not frozen.

Xxfe - 4 + uf + on, and check that e doesn't get frozen when it moves to f spot

Xxfxe - 5 + uf + on, and check two spots that e dosn't get frozen on the way

Epf - 3 + uf

Xpf - 3 + uf + on

Xxef, Xxxfe - 6 + uf + on

Traps with one friendly piece adjacent

ePf - 1 step

Xfe - 2 + uf + on

Ef - 2 + uf, and check if there is empty square to move to

Ffe - 2 + uf

Xfxe - 3 + uf + on, and check if e won't freeze after move

Ffxe - 3 + uf, and check if e won't freeze

Ffpe - 1

Xfwe - 4 + on + uf, and check if e won't freeze

Xfwxe - 5 + on + uf

Xffe - 4 + on + uf, check if e will freeze

Fffe - 4 + uf

Xfxxe - 4 + uf, and check that right x is not unsafe trap

exXf - 4 + uf, and check that trap is safe

eXf - 3 + uf + on, and check that e doesn't suicide


Traps with two friendly pieces adjacent

efXfe - 4 + on.  choose to trap the bigger piece

I think this is all of them.

Title: Re: Trap evaluation in Bomb
Post by chessandgo on Feb 12th, 2007, 5:57am
I've been trying to generate capture moves lately, I'm not done yet but I certainly would be very interested to see an extensive list of capture patterns.

Title: Re: Trap evaluation in Bomb
Post by IdahoEv on Feb 12th, 2007, 1:53pm
I would be interested to see them as well.

Thank you for this interesting and informative series of posts.  Out of curiosity, what brought them on?

Title: Re: Trap evaluation in Bomb
Post by fotland on Feb 12th, 2007, 8:54pm

on 02/12/07 at 13:53:56, IdahoEv wrote:
I would be interested to see them as well.

Thank you for this interesting and informative series of posts.  Out of curiosity, what brought them on?



Fritzlein's post: One wonders how many other efficiency-boosting tricks you casually integrated into your code, based on ideas the rest of us wouldn't hit upon in years.

But then I decided I have to explain the basics before I can explain the mate search, etc.

Title: Re: Trap evaluation in Bomb
Post by chessandgo on Feb 20th, 2007, 9:35am
Thanks for taking the time typing all these patterns.



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