Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Using BSF/BSR and bitboard rays only for sliding pieces

Author: Sune Fischer

Date: 13:42:10 02/01/02

Go up one level in this thread


On February 01, 2002 at 16:25:16, Miguel A. Ballicora wrote:


>>Of cause one thing that is an absolute must, is to check that you _need_ to
>>update the attack board in the first place. Most moves made will only invalidate
>>a few of the attack boards, so there is generally no reason to mindlessly update
>>them all every time.
>>I don't think any attack algorithm so fast that this test will actually slow
>>things down. For the non-sliding pieces don't do the check, but for the sliding
>>pieces I believe it is a sound investment.
>
>That is how I started with my program. It was a clever idea but slower :-)
>Maybe it needed a better implementation? mmhh.. I think that the more we want to
>add, the more we slow it down.

Slower?

All you need is the check:

if (AttackBoard & MaskDelta[to][from])
...then update...
else
...the old one is still valid...

that check should be faster than even rotated bitboard attacks, right?

Considering how often the statement will be false (more than 50% I'll bet), I
think it is a neat trick ;)
Of cause I don't have rotated so I can't test... :(

-S.



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.