Author: Russell Reagan
Date: 20:00:14 10/15/02
Go up one level in this thread
On October 15, 2002 at 18:08:40, Steffan Westcott wrote:
>I'm unclear what you mean by the "classic ray tracing approach".
What I mean is that if you have an array based model, such as:
int squares[64];
Then to generate legal rook moves, you have to have a loop:
from = GetWhiteRookSquare();
while (SquareIsOnBoard(to)) {
if (squares[to].color == WHITE)
break;
push_move(from, to);
to += 8;
}
Or whatever. I just made that up for explaination purposes. The reason I ask is
that I recall some people saying in the past that they were able to get better
speeds using this ray tracing (or scanning a file, rank, diagonal) method to get
a speedup over rotated bitboards. Of course, as you said, there are so many
factors that differ, from CPUs to motherboards to memory to cache hits, branch
prediction, not having a clue how to use rotated bitboards (or another method),
and so on. One thing I have noticed over the years is that almost every board
representation can be made to work reasonably well. You just have to know how to
take advantage of it.
>Mail me if you want a copy.
Done :)
Thanks,
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.