Author: Russell Reagan
Date: 16:04:05 10/22/04
Go up one level in this thread
On October 22, 2004 at 17:28:39, Dann Corbit wrote: >If you use bitmaps, you can calculate all the attacks (and even the pins and >half-pins) in a single table lookup for any ray of attacks. > >For any position on the board, there are at most 7 squares attacked along a ray >(since you never attack the square you sit on). Now, of those 7 squares there >are exactly 128 different bit occupation patterns. So you precompute a table of >those patterns. If you are only generating attacks, then you only need the inner 6 bit occupation state to generate attacks, so a 64 element lookup table will do. I guess you use a 7-bit occupation state since you are also detecting pinned pieces, xrays, etc. where the state of the end square is required. Is that the case?
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.