Author: blass uri
Date: 01:29:07 06/21/00
Go up one level in this thread
On June 21, 2000 at 00:06:21, James Robertson wrote: >On June 20, 2000 at 22:49:30, Dave Gomboc wrote: > >>On June 20, 2000 at 14:58:54, James Robertson wrote: >> >>>On June 20, 2000 at 12:18:06, Ralf Elvsén wrote: >>> >>>>I'm asking about things I don't have much personal experience from >>>>so forgive me if this is a stupid question. With BB, as I understand >>>>it, one usually have a lot of precomputed BB-arrays, like bishopsMoves[square], >>>>maybe blocks[from][to] or the rotated BB-stuff. Is this causing problems >>>>for the cache? How much precomputed stuff is needed in 0x88 compared to this? >>>> >>>>Ralf >>> >>>I'll answer your second question first. A tiny amount (guesstimate, maybe 1k) is >>>needed for 0x88. Bitboards require much more... almost 600k for core arrays on >>>my program. Crafty uses some funky thing called compact attacks which I guess >>>compacts the attacks. I don't know how it works. (Dr. Hyatt, could you please >>>explain how it works and what it's advantages are?) >>> >>>The precomputed arrays are usually in the form of attacks for ranks and files. >>>To try to stuff all bishop or rook moves into one array is a bad idea. For >>>instance, in my program, rook moves would require an array of dimensions >>>8*64*256*256 bytes = 33MB! >>> >>>Taking two arrays, one for ranks and one files (each 8*64*256 = 131072 bytes) is >>>a lot better. >>> >>>James >> >>Can you elaborate on what you are doing, how you are doing it, and why you are >>doing it? 256 Kb sounds like quite a lot of storage. > >Why? Because I know how, and it is a lot of fun. > >What? Basically, I use the square the piece is standing on and the >rank/file/diagonal I am trying to find moves for as indices into my tables. For >instance, say I want to find rank moves for a rook on a1 (the first rank), and >my bitboard of occupied pieces looks like: > >10000010 // a1 through h1 >00000000 // a2 through h2, etc. >00000000 >00100000 >00000000 >00000100 >00000000 >00000000 > >I then extract the first 8 bits (10000010 = 65 in decimal) and the piece's >square ( = a1 = 0) and > >rank_attacks[0][65]; > >returns a bitboard that looks like: >01111110 >00000000 >00000000 >00000000 >00000000 >00000000 >00000000 >00000000 > >Voila, you have all the rank moves for that rook. > >James You use only 64*256 array for rank_attacks so I do not understand why do you need 8*64*256 array. Uri
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.