Author: Sune Fischer
Date: 04:19:55 08/24/03
Go up one level in this thread
On August 24, 2003 at 06:41:28, Omid David Tabibi wrote: >On August 23, 2003 at 20:53:40, Sune Fischer wrote: > >>On August 23, 2003 at 20:28:02, Omid David Tabibi wrote: >> >>>How do you find out how many pieces of a kind attack a square? E.g., how do you >>>calculate the number of rooks that attack a square? >> >>If you just want the number this is not the fastest, you need to popcount. >>However, I don't really see what good such a number would be. > >If you want to update your table dynamically, you need to know how many pieces >of a kind attack a certain square. You don't need the number as such, what you need to know is exactly who does the attacking, cause those are the ones that needs to be updated. Howelse do you do *incremental* update? > E.g., you move a piece out of e4, and you >know that e4 is attacked by rook. Rook is a sliding piece and know that attack >table should be updated. If you don't know by _how many_ rooks is e4 attacked, >then you have to check all your rooks to check whether they attack e4. If you >exactly know the number of attacking rooks however, you can stop as soon as you >find the appropriate number. So lets say there are 2 rooks attacking e4, then what? Where are these two rooks and how does this move change their attack status. The number of rooks is not needed afaik. >>Their directions and/or squares would be more valuable information I thought, so >>that was what I went for. >> >>The real trick is probably to somehow make due without all this :) >> >>> >>>> >>>>I'm not really sure it is that great an idea, probably it is better to stick to >>>>just using bitboards with squares. The index layer is not really needed as far >>>>as I can tell. >>> >>>That is what I thought; if you are using 1 bit per piece, then why not just use >>>bitboards... >> >>Because it's twice the space and takes longer to undo when you copy. > >Yes, these are the two things I hate about bitboards: the costly copy, and far >more importantly, the annoying popcount for extracting the most simple >information. I think re-shuffling a piece list at every capture is not so pretty either :) -S. >>-S.
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.