Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Way of compressing attacks bitboards

Author: Robert Hyatt

Date: 14:03:56 05/06/04

Go up one level in this thread


On May 06, 2004 at 16:59:57, Sune Fischer wrote:

>On May 06, 2004 at 16:07:16, Robert Hyatt wrote:
>
>>On May 06, 2004 at 13:00:06, Mathieu Pagé wrote:
>>
>>>Hi,
>>>
>>> Actualy my engine use pre-calculated bitboards to generate the moves. and I was
>>>asking myself if compressing them, in order to keep them in cache would make my
>>>move generator faster. I tought about two techniques to compress them.
>>>
>>>1. Use a 7 bits mask as a representation of the occupancy of the line as we
>>>always know that the position where the piece that we want to move is occupied.
>>>I already use this and it cut the space used by the index by a factor of two.
>>>I'm sure you were all aware of this trick.
>>
>>What about using a 5-bit mask then.  You don't need the two endpoint bits anyway
>>as you attack those squares whether they are occupied or not.
>
>What if the square is on the edge and thus already removed?
>Seems you end up with some being 5 bit and some being 6 bit lines.


Doesn't matter.  Remember that you already know whether you are on the edge or
not.  The only thing that matters is the occupied squares between the two
extreme points.  That is why I currently use 6 bits.  But by removing the bit
for the piece being tested, that would/could drop to 5.


>
>>I use 6 bit myself as squeezing out the square the piece is on is not
>>convenient...
>
>-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.