Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: quick bitboard question

Author: Dan Honeycutt

Date: 13:55:28 08/26/05

Go up one level in this thread


On August 26, 2005 at 16:36:47, Dan Honeycutt wrote:

>On August 26, 2005 at 16:15:47, Robert Hyatt wrote:
>
>>On August 26, 2005 at 16:11:53, Dan Honeycutt wrote:
>>
>>>Run the lowest bits down the a or h file and you can do pawn captures without
>>>having to mask those files.
>>>
>>>Best
>>>Dan H.
>>
>>
>>How would you avoid masking?  Otherwise the pawn at h2 would still wrap to a3 on
>>a shift...
>
>h8 = bit 0
>h7 = bit 1
>:
>a1 = bit 63
>
>If I ran that the right way, the out of bounds bits are lost and 0's are shifted
>in on the other side.
>
>Best
>Dan H.

Looking at it, I think that's right.  Take white pawns on g4 and h4 with
captures to the right.  g4 is bit 12 and h4 is bit 4.  My shift is 9 left, so g4
lands on h5 (bit 3) and h4 is discarded.

Best
Dan H.






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.