Author: Sune Fischer
Date: 15:38:03 02/01/02
Go up one level in this thread
On February 01, 2002 at 18:03:01, Alvaro Jose Povoa Cardoso wrote: >On February 01, 2002 at 16:42:10, Sune Fischer wrote: > >>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. > >Could you please explain in detail your technique? >What is contained in the MaskDelta array? >Do you update attack boards in the make/unmake functions? >Remember, I only did a checkers engine :) oh sorry, of cause ;) MaskDelta[to][from] = Mask[to] | Mask[from]; and the Mask[64] array is: Mask[i]=1<<i; so only the i'th bit is sat, the rest are zero. And I personally do not update them in the makemove() right now, but I see no problem with doing that, you may check what others do, some people here know a great deal about these things. -S. >Alvaro
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.