Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: just another reverse bitscan

Author: Frederik Tack

Date: 09:41:43 12/23/05

Go up one level in this thread


On December 23, 2005 at 12:15:31, Gerd Isenberg wrote:

>>>I see - but if i like to introduce color dependent routines for bitboard
>>>traversal, i would make them rank-symmetric but not file-symmetric - so that
>>>black-white mirrored (including side to move changed) positions are exactly
>>>searched in the same manner as the original position.
>>
>>That's exactly what these functions do, they are rank-symmetric.
>
>Yes, but a kind of file-symmetry as well.
>
>  a8            h8==MSB
>8 0 b 0 0 b 0 0 0
>7 0 0 0 0 0 0 0 0
>6 0 0 0 0 0 0 0 0
>5 0 0 0 0 0 0 0 0
>4 0 0 0 0 0 0 0 0
>3 0 0 0 0 0 0 0 0
>2 0 0 0 0 0 0 0 0
>1 0 w 0 0 w 0 0 0
>  a b c d e f g h
>  a1==LSB       h1
>
>For white, using bsf you get b1, and then e1 from q-wing to k-wing.
>For Black, using bsr you get e8 before b8 - but i like to get b8 before e8.
>Or did i miss something?
>
>Gerd

I see what you mean. Next to the two functions i mentioned, i also have a
BitscanForwardWhite and a BitscanReverseBlack function. If i need file symmetry,
i use the two BSF or the two BSR functions. However, in that case i don't have
rank symmetry. If i wanna use the BSF and BSR instructions, i will never have
the perfect symmetry, but i don't really need that.

Fred






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.