Author: José Carlos
Date: 03:04:56 01/21/03
Go up one level in this thread
On January 21, 2003 at 05:46:37, Bas Hamstra wrote: >Hi Russell, > >Question: Why do you calculate KnightAttacks the way you do? Why not simply > > KnightAttacks(Sq) = KnightAttMask[Sq]; > >One memory lookup in a small precalculated table KnAtt[64] should be much much >faster. For the rest I am interested to test the speed of the C-style fill >routines against rotated BB. Will be slower, but how much? > >Bas. It can be useful for any calculation you can do in parallel. For example, you might want to know which of your pieces are attacked by opponent light pieces. For simplicity, let's suppose you're only interested in knight attacks. Then you do: KinghtAttacks(MyPieces) & OpponentKnights If don't know if it is faster than extracting the bits from OpponentKnights, doing the table lookup and matching it against MyPieces, but it's simpler. José C.
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.