Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboard user's information request

Author: Dan Newman

Date: 05:53:58 10/07/99

Go up one level in this thread


On October 06, 1999 at 20:32:08, Eugene Nalimov wrote:

>On October 06, 1999 at 20:27:02, Dan Newman wrote:
>
>>On October 06, 1999 at 07:32:00, Bas Hamstra wrote:
>>
>>>On October 06, 1999 at 05:42:45, Dan Newman wrote:
>>>
>>>>On October 05, 1999 at 12:00:19, Robert Hyatt wrote:
>>>>
>>>>>I have finished writing a paper for the JICCA on the rotated bitmap approach
>>>>>to chess...  although it includes traditional (non-rotated) bitmaps as well
>>>>>since an understanding of them is necessary to appreciate rotated bitmaps.
>>>>>
>>>>>There is very little literature to reference, excepting the paper in the
>>>>>old Chess Skill in Man and Machine book, so I thought that I would at least
>>>>>mention the names of current (and past, such as Kaissa) programs that are or
>>>>>did use bitboards.
>>>>>
>>>>>If you are using them, either post the particulars here (name of program,
>>>>>author, affiliation [if any], and so forth) and I'll include it.
>>>>>
>>>>>Thanks...
>>>>>
>>>>>Bob
>>>>
>>>>I'm working on one now that I am provisionally calling Shrike (after
>>>>the bird that impales its prey on cactus needles), but I've only been
>>>>working on this one for about 2 1/2 weeks...
>>>>
>>>>It uses non-rotated bitboards and so must frequently scan the board
>>>>for slider move generation and attack detection.
>>>>
>>>>So far I like it.  It's given me the simplest move generator and
>>>>make/undo code that I've gotten so far.  It is slightly slower
>>>>generating moves than my 0x88 program, but I suspect/hope that will
>>>>be offset by gains elsewhere--specifically in the SEE and eval.
>>>>
>>>>Name: Shrike
>>>>Author: Dan Newman
>>>>
>>>>-Dan.
>>>
>>>
>>>About that scanning the board:
>>>
>>>I have a simple testversion that too uses non rotated bitboards. If I want to
>>>know if a pseudo attack is blocked by any piece I use:
>>>
>>>  BlackPieces & WhitePieces & BlockMask[FromSquare][ToSquare]
>>
>>I think you meant:
>>   (BlackPieces | WhitePieces) & BlockMask[FromSquare][ToSquare]
>>
>>>
>>>The array BlockMask is a bitboard array which for each square to each other
>>>square (if possible, only "slider type") contains the bitmap. It works well, is
>>>easy and still fast.
>>>
>>>
>>>Regards,
>>>Bas Hamstra.
>>
>>That's neat.  I'll have to try it.  The only worry I'd have is the
>>space that BlockMask takes up (32k if I've calculated correctly) and
>>how that might affect the cache.  But it can be used in a lot of places
>>(move gen, SEE, in check test, eval, any place that needs to calculate
>>attacks) and seems like it'd be a lot quicker than scanning.
>>
>>-Dan.
>
>You can make it 2 times smaller, by making it a "triange", not a "rectangle".
>Not sure that it'll make sense, as index code will be more complex.
>
>Eugene

This idea is threatening to twist my brain into a pretzel...  At first I
thought: it won't work, but now...  Certainly, BlockMask[a][b] should
equal BlockMask[b][a], so it seems we need only half the entries.  So a
little extra index mangling would cut the memory footprint in half.
I'll have to think about this...

-Dan.



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.