Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboards: must I rotate ?

Author: Matthias Gemuh

Date: 23:53:12 05/11/02

Go up one level in this thread


On May 12, 2002 at 00:23:07, Robert Hyatt wrote:

>On May 11, 2002 at 05:48:17, Matthias Gemuh wrote:
>
>>
>>Hi Experts,
>>how much faster can I compute attacks when I rotate ? 5%? 20%? 50%?
>>I don't understand rotation and hope the gain is 1% speed boost :-).
>>Regards,
>>Matthias.
>
>It is more than that.  The main thing is that it eliminates the loop needed
>to find where a particular diagonal, file or rank is blocked.  Generating
>the attacks on a particular "ray" becomes a simple table lookup...


I don't loop. I use an idea from Crafty (blocking squares)

if (((MovesAndAttacks->obstructed[k][j] & BitBoth) == 0) &&
           (MovesAndAttacks->SlidingMoves[bishop][k]&ChsPos->Mask[j]))

tells me bishop on square k can move unhindered to square j.
Is this too expensive ?

Regards,
Matthias.







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.