Author: Russell Reagan
Date: 14:10:48 10/15/02
Go up one level in this thread
On October 15, 2002 at 13:24:37, Steffan Westcott wrote:
>BitBoard FillUpOccluded(BitBoard g, BitBoard p)
>{
> g |= p & (g << 8);
> p &= (p << 8);
> g |= p & (g << 16);
> p &= (p << 16);
> return g |= p & (g << 32);
>}
That's interesting. I have two questions.
First, how does this compare to a classic ray tracing approach? It seems like
both methods would use around the same number of instructions, but your routine
is constant in the number of instructions, while the ray tracing approach is
not. There are also branch mis-predictions to worry about with the ray tracing
method.
Second, this method seems like it partially solves the need for rotated
bitboards. You would be able to compute the file moves and attacks using this
method, but what about diagonal moves and attacks, such as for bishops? Do you
have any similar method for solving that?
I don't care for rotated bitboards much myself, so I'd like to find a nice way
to avoid them if I can. Thanks for the examples.
Russell
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.