Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboard question

Author: Gerd Isenberg

Date: 06:55:26 07/07/03

Go up one level in this thread


On July 07, 2003 at 09:21:17, Jarkko Pesonen wrote:

>In Crafty bitboard function FirstOne gives 12 and LastOne gives 53.
>Is there fast implementation for LeftOne and RightOne, which
>would give in below case 33 and 38.
>C implementation would ne appriciated.
>
>---+---+---+---+---+---+---+---+
>   |   |   |   |   |   |   |   |
>---+---+---+---+---+---+---+---+
>   |   |   |   |   | *P|   |   |
>---+---+---+---+---+---+---+---+
>   |   |   |   |   |   |   |   |
>---+---+---+---+---+---+---+---+
>   | *P| *P|   |   |   | *P|   |
>---+---+---+---+---+---+---+---+   0x0080000062000400
>   |   |   |   |   |   |   |   |
>---+---+---+---+---+---+---+---+
>   |   |   |   |   |   |   |   |
>---+---+---+---+---+---+---+---+
>   |   |   |   |*P |   |   |   |
>---+---+---+---+---+---+---+---+
>   |   |   |   |   |   |   |   |
>---+---+---+---+---+---+---+---+
>
>thanks in advance
>
>Jarkko

Hi Jarkko,

i fear there is no fast LeftOne or RightOne with this bit mapping
a1=0,h1=7,a2=8,h8=63. Rotating eg. Mirroring files with ranks is a rather time
comsuming algorithm - unless you use several rotated bitboards with incremental
update during make/unmake move.

Regards,
Gerd




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.