Author: Russell Reagan
Date: 09:35:03 06/03/03
Go up one level in this thread
On June 03, 2003 at 11:46:53, Robert Hyatt wrote: >>for (i = 0; i < 64; i++) { >> // code goes here... >>} > >Most don't do this even without bitboards. The easy approach is to have >an array of 32 elements, with the first 16 containing the square numbers >for white pieces and pawns, and the last 16 the same for black. As pieces >are removed, the two lists become shorter, and the length of the loop is >dropped from 64 to 16 to start with, and lower as pieces are removed. I know most use the approach you mentioned, but that can get messy, and can be error prone (at least in my experience). You have to update more things and maintain more things (much more than two bitboards worth). Maybe the array approach is a little faster, but...someone once said that speed isn't where the advantage lies for bitboards. Sound familiar? :P
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.