Author: Russell Reagan
Date: 10:57:37 08/03/02
Go up one level in this thread
On August 03, 2002 at 06:47:20, Bo Persson wrote:
>I have no real use for AllPieces in my program,
I am testing out different ideas, and the only use I can see for all pieces
bitboard would be to determine if a square is occupied or not.
>so I don't store that.
>Occationally, I need its complement EmptySquares which is then computed as
>
>~(LitePieces | DarkPieces)
This is one thing I was thinking about. How do you determine when it's better to
have a bitboard and incrementally update it, and when it's better to compute a
bitboard from the ones you incrementally update?
It seems like it would be best to have as few bitboards to incrementally update
as possible, since you will be updating them over and over and over, and then
when you get to evaluation, it only costs a small amount to compute one compared
to all of the incremental updating you did to get there.
>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.
Why don't you have a bitboard for kings? How do you detect if a king is in
check? I would think that you would do:
if (whiteKing & blackAttacks)
// then king is in check
How do you do this if you don't have a king bitboard?
>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 am toying around with bitboard approaches, 0x88 approaches, and also hybrid
approaches. I'm not done yet, but I have a feeling that a hybrid will produce
the best results when I'm through.
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.