Search the web
Sign In
New User? Sign Up
abalone_prog · Abalone
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: Pattern matching   Message List  
Reply | Forward Message #86 of 96 |
Re: Pattern matching

--- In abalone_prog@yahoogroups.com, david.malek@... wrote:
>
> I looked at the LaTeX formulas, the problem is that i'm not using
the manhattan
> distance as such. i.e. based on independant x and y when calculating.
>
> I'm using arithmetic distance defined as follows
>
> d(xi,yi,xc,yc) =
>
> if (xi-xc)(yi-yc)>0
> return max (xi-xc,yi-yc)
> else
> return abs(xi-xc) + abs(yi-yc)

Your formula for distance is in fact the Manhattan distance. Charles
Fu had it figured out in 1994. Read this link:
http://www-cs-students.stanford.edu/~amitp/Articles/Hexagon2.html
At the bottom it proves that

1/2 (|x1 - x2| + |y1 - y2| + |z1 - z2|)
=
max(|x1 - x2|, |y1 - y2|, |z1 - z2|)

And the latter is the same as your formula. Note that z = x-y since
your coordinate system has 120 degrees between x and y axes. In this
case z is 60 degrees from both x and y axes.

>
> > > In MLA, in line move generation is performed as follows
> > >> Why add? Why not simply overwrite? It ought to be faster.
> > True. But adding makes undo a substraction of the same numbers.

Good point, I didn't think of that.



> > > With respect to bitboards, I have not found a convincing case
for them.
> > oh yes, finding patterns and handling rotation is documented by
the author of
> > crafty too. your C is interesting. But trying to use the ONLY
bitboards for
> > center of mass computation, move generation, domove/undomove might
be hard.
> > Hmm
> > this would even impact my search ... hmm for MLA 4.0 lol.

I don't think it would be faster than a hybrid approach. I think it is
faster to use a byteboard to find the movenumber, then use bitboards
for the stuff that they do better (pattern matching, for example). It
is very fast to update a bitboard, once you have a movenumber.



Regards,
Peer





Tue May 29, 2007 9:28 am

peer_sommerlund
Offline Offline
Send Email Send Email

Forward
Message #86 of 96 |
Expand Messages Author Sort by Date

Thanx for all this :) I still dont understand why my new version of the engine beats the previous one lol. Each time I slightly change my amendments to the...
david.malek@...
mogwaifrance
Offline Send Email
May 22, 2007
8:20 am

... True. But adding makes undo a substraction of the same numbers. Also it allowed me to define ranges for the move number, due to unchanged fields (0 values...
david.malek@...
mogwaifrance
Offline Send Email
May 22, 2007
2:28 pm

I looked at the LaTeX formulas, the problem is that i'm not using the manhattan distance as such. i.e. based on independant x and y when calculating. I'm using...
david.malek@...
mogwaifrance
Offline Send Email
May 22, 2007
5:02 pm

... the manhattan ... Your formula for distance is in fact the Manhattan distance. Charles Fu had it figured out in 1994. Read this link: ...
Peer Sommerlund
peer_sommerlund
Offline Send Email
May 29, 2007
9:29 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help