Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboard engines

Author: Bo Persson

Date: 03:47:20 08/03/02

Go up one level in this thread


On August 03, 2002 at 04:17:12, Russell Reagan wrote:

> For example, most engines have bitboards for:
>
>all pieces
>white pieces
>black pieces
>white/black pawns, knights, bishops, rooks, queens, and king
>then some rotated bitboards
>
>That seems to be the "standard" method, but some engines have extra bitboards or
>different ones entirely.

Well, "standard" might mean "looking at Crafty"...

What bitboards you need is entirely up to how you are going to use them. Pretty
obvious, right?  :-)

I have no real use for AllPieces in my program, so I don't store that.
Occationally, I need its complement EmptySquares which is then computed as

~(LitePieces | DarkPieces)

The slight saving here might be an unintended cache optimimization.


On the other hand, I do store combined bitmaps DiagSweepers (queens and bishops)
and AngularSweepers (queens and rooks) as this seems to speed up my attack
detection. YMMV.


I also don't have bitboards for the kings. As there will always be just a single
bit set in these anyway, I just store the bit index/square number for the kings.

> Most use an offset based board with their bitboards
>too.

An array of pieces is a quick way to find what pieces is on a gives square.
Basically it is a map from Square to Piece, while the bitboards are mapping from
Piece to Square. You might have use for both.

>I don't recall off the top of my head if there are any engines that use
>bitboard exclusively. Surely there is.
>
>I am currently doing some tests between different board representations, so I'm
>fiddling with different ideas, so if you wouldn't mind showing me your board
>representation, I'd appreciate it.
>
>Thanks,
>Russell


Bo Persson
bop2@telia.com




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.