Author: Robert Hyatt
Date: 19:29:35 07/02/00
Go up one level in this thread
On July 02, 2000 at 18:07:25, Larry Griffiths wrote: >On July 02, 2000 at 16:05:48, Robert Hyatt wrote: > >>On July 02, 2000 at 13:24:35, Larry Griffiths wrote: >> >>>Bob, >>> >>>Are the RL90, RR45, and RL45 bitboards only maintained for occupied squares? >>> >>>Larry. >> >> >>Yes... they are only used to determine the 'state' of a rank/file/diagonal, >>they aren't needed for anything else??? > >That is what I thought... > >Then I will have a bitboard for each type of piece... >6 bitboards for black pieces pawn,knight,bishop,rook,queen,king... >6 bitboards for white pieces pawn,knight,bishop,rook,queen,king... >4 bitboards for occupied squares... >1 bitboard for all black piece types... >1 bitboard for all white piece types... Couple of points: 1. you can get by with three occupied squares bitmaps if you have white/black also. Just OR them together. I do this as after testing it was fractionally faster. 2. You will probably want a "bishop/queen" and "rook/queen" bitmap, as it becomes very useful later. You generate attacks and then want to know if there is a sliding piece behind the attacker that is helping. If you have the above bitmaps, you can just AND that with the attacking bitmap to see if a sliding piece is attacking. And if so, it might have a similar piece behind it in 'battery'. > >and a move of a black pawn would update the > black pawn bitboard > all 4 occupied square bitboards (rank,file,Leftdiag,RightDiag) > the all black piece types bitboard...
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.