Author: Robert Hyatt
Date: 19:14:42 05/22/03
Go up one level in this thread
On May 22, 2003 at 20:52:11, Russell Reagan wrote: >I'm having a hard time figuring out how the compact-attacks work in Crafty (get >lost in the preprocessor stuff). Could Bob, or anyone who understands it, >explain the general idea? > >Also, how much memory do the compact attacks use? I assume the "full" attacks >are 512 KB? 256 rank/file/diagonal states * 64 squares * 8 bytes per bitboard * >4 tables (rank/file/a1-h8/h1-a8) = 524,288 bytes = 512 KB. Is this correct? Yes. The compact attack stuff compresses this quite a bit, so that the "endpoints" are not needed in an index (IE there is no need for 8 bit indices for an entire rank/file/long diagonal since the endpoints are known already.) This cuts one dimension to 2^6 rather than 2^8, a 3/4 reduction. It also makes use of the fact that doing extra work is much faster than doing memory references, so that some of the computation is faster than the corresponding table lookups would be.
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.