Author: Alessandro Damiani
Date: 10:03:16 12/06/05
Go up one level in this thread
On December 06, 2005 at 02:31:57, Gerd Isenberg wrote: >On December 05, 2005 at 17:23:16, Alessandro Damiani wrote: > >>Just wondering: does anyone use flood-fill to detect open files? >> >>Alessandro > >I do it indirectly, i have front-span and back-span of both white and black >pawns. Oring all spans and the pawns itself gets a set of all pawn occupied >files - and the complement is the open-file set. > >Direct calculation is like that: > >bb = allPawns; >bb |= bb >> 8; >bb |= bb >> 16; >bb |= bb >> 32; >bb = ~bb & 0xff; // if you only need a file-set, take it here >bb |= bb << 8; >bb |= bb << 16; >bb |= bb << 32; >openFileSet = bb; > >Gerd Thanks. Maybe it's faster than incremental updating. And since you use pawn front- and back-spans, detecting open files is cheap. Do you use pawn front- and back-spans to determine both players' territory? Alessandro
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.