Author: Gerd Isenberg
Date: 12:13:59 02/27/06
Go up one level in this thread
On February 27, 2006 at 14:16:38, Dann Corbit wrote: >You have a special genius for bitboards and I always enjoy reading your posts. Thanks Dann, i appreciate that - but i have not special genius but morbus knuth ;-) I like interactive brainstorming and to formulate ideas so that they become more clear. I had some difficulties to understand your switch approach first. What do you think about masking off outer occupied bits? As well inside your switch cases as well as a 64-bit factor of a De Bruijn multiplication? They are redundant for attacks and also for possible xrays. It reduces the number of occupied cases to max 2**(raylenght-2) if source square is an outer square - or most often to 2**(raylenght-3), if source is some inner square, for instance bishop on e5 on the a1-h8 diagonal: 0 0 0 0 0 0 0 x 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 b 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 x 0 0 0 0 0 0 0 Thus some 64-states and most 32-bit or less states fits perfectly to a 2**6 range by "De Bruijn folding" with empirical determined individual magics for each source square and direction. Obviously each single bit-subset of the five or six bits leaves unique upper six bits after a multiplication with a DeBruijn constant, because the DeBruijn is per definition a sequence of 64 unique 6-bit strings - and mutiplication with power of two is like shifting left by log2. That is the original idea of using De Bruijn multiplication as log2 or bitscan. Having more bits set produces modulo 64 sums of appropriate unique subsequences. So we have "only" to choose a De Bruijn or "modified" De Bruijn where all sums modulo 64 are unique. Cheers, Gerd
This page took 0.02 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.