Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Yet another bitboard question (YABQ)

Author: Russell Reagan

Date: 01:35:02 08/04/02

Go up one level in this thread


On August 04, 2002 at 03:38:25, Sune Fischer wrote:

>On August 03, 2002 at 22:28:18, Russell Reagan wrote:
>
>>Thanks Bob and Sune. I wasn't thinking that far ahead and was thinking there was
>>a shortcut. It's not like one additional AND operation is going kill performance
>>:)
>>
>>Russell
>
>You hardly ever need to mask out the friendly pieces actually. Usually you
>generate captures, in which case you AND with the opponents pieces, or you will
>want the non-captures in which case you AND with the complement of all occupied
>pieces. Both operations automaticly removes the friendly pieces :)
>
>-S.

I actually was thinking about all of what you were just saying earlier today. I
am looking over the source code of all of the bitboard engines that I have, and
figuring out how they all do stuff, and what operations are needed, which
bitboards are needed, and so on. I'd probably just go nuts with bitboards, have
bitboards for "pawns and king" or something, just in case I ever wanted to use
it :)

So basically what I'm doing now is trying to determine which ones I need and
which ones are overkill. Maybe you can tell me how I'm doing. For example, I
don't think you need an "all pieces" bitboard, since you can compute it via
(whitePieces | blackPieces) which is a single OR operation (well, more on
32-bit, but...). That is cheap compared to the cost of keeping up with an "all
pieces" bitboard and incrementally updating that one at every node just to avoid
the single OR operation. So that makes me think "all pieces" is overkill. Is
that right or not? Then again, there is the need to use "all pieces" to compute
the rank/file/diagonal states. Hmm...help?

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.