Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: TSCP with bitboards

Author: Robert Hyatt

Date: 10:19:43 06/04/03

Go up one level in this thread


On June 03, 2003 at 12:35:03, Russell Reagan wrote:

>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


Yep.  But if you don't have _all_ the bitboard stuff, just one showing where
all pieces are located, then most of the advantages are lost...




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.