--- 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