Author: Stuart Cracraft
Date: 14:20:29 10/08/97
Hi, I have a question about bitboarding. When generating sliding piece moves, it's been made clear to me that you must calculate the 256 known states of an 8 bit rank, file, or diagonal, create an array like (A) maps[64][256] and then use this to extra legal moves. My question is: how do I calculate the 256 known states? I assume one state might be (B) M M E M M F M M (e.g. 0 0 1 0 0 1 0 0 = 32+4=36) where M is an empty square, E is an enemy piece and F is the friendly slider. This might result in the bitmap (C) 0 0 1 1 1 0 1 1 being returned showing a 1 for each position that is legal for F to move to. I have no problem visualizing this but I have problems visualizing how to calculate (C) from (B) and how to calculate all possible (B)'s for (A). Thanks, Stuart
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.