Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Reverse bitboards

Author: Gerd Isenberg

Date: 12:53:02 11/30/02

Go up one level in this thread


On November 30, 2002 at 14:31:25, Russell Reagan wrote:

>On November 30, 2002 at 12:39:40, Arshad F. Syed wrote:
>
>>Anyone done any research on this? Is it worth looking into?
>>
>>http://www.fys.ku.dk/~fischer/Temp/New%20Technology.htm
>>
>>Thanks,
>>Arshad
>
>This sounds similar to the Kogge-Stone stuff. Different algorithms, but similar
>in the fact that you don't need rotated bitboards, and you generate attacks by
>computation rather than lookup.

Reversed bitboards have nothing to to with Kogge-Stone or Flood Fill Algorithms.
As far as i remember it is based on the x^(x-2) trick to generate attacks from
single sliding pieces in all index increasing directions.
It uses reversed bitboards to use the same trick in all other directions.
On drawback is that you must handle also reversed attack bitboards. If you need
to combine them, you have reverse one by mapping all bits i to bit 63-i.

But the x^(x-2) trick is great and if i remember right, that side was the first
time, i heard from this trick.

I use the x^(x-2) idea bytewise (SIMD), in my mmx-routines to generate multiple
rook attacks in the right board direction, even if multiple rooks are on the
same rank:

 // input:  mm6 occupied, mm1 rooks
 // output: mm0 right rook attacks
 movq	mm0, mm6	; occupied
 psubb	mm6, mm1	; occupied -   rooks
 psubb	mm6, mm1	; occupied - 2*rooks
 pxor	mm0, mm6	; rightRookAttacks := occupied ^ (occupied - 2*rooks)


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.