Computer Chess Club Archives


Search

Terms

Messages

Subject: Fast bitmap methods.

Author: David Blackman

Date: 04:41:03 03/31/99

Go up one level in this thread


On March 30, 1999 at 12:20:21, Dann Corbit wrote:

>On March 30, 1999 at 01:14:10, David Blackman wrote:
>[snip]
>>If you want bitboards, invent your own method. There is at least one
>>better method already in use, and further improvement should be possible.
>I would be keenly interested to know about the better method in use.  Do you
>know of a code sample I could examine?  By the way, I agree 100% with your
>method of study and emulation of technique.  That's the only way you'll really
>understand it anyway.

Each square on your board array is a 32 bit bitmap. There are a maximum of 32
pieces on the board at any time. You try to keep each  player's pieces sorted by
value, so the Find-First_One operation turns up the least valuable piece. You
have an array of pieces, seperate to the board, that contains an index into the
board for where that piece is currently, and any other information you need.
This array is also sorted by piece value, in fact positions in this array are
the same as positions in the 32 bit bitmaps.

Really fast move generation, one at a time, in approximately MVV/LVA order is
easy. This is great for the quiescence search. Most other methods require
generating several moves at a time and sorting, which is slower. This kind of
bitmap is also useful if you want to do SEE pruning in the quiescence search,
and can be helpful for certain positional factors.

Like most bitmaps, move generation is almost for free. Unlike most bitmaps,
updating when you make a move is fairly cheap.

I think this method is the one used in KnightCap. KnightCap is fairly slow
because it spends a lot of time in positional eval. Move generation hardly shows
up in the profile. TD-Chess is pretty quick and might use the same methods
(hello Jon?).

The big question is NOT "can you do this from my vague description plus sneaking
a look at KnightCap", but "has this inspired you to look for something even
better". Approx 600 machine instructions per node for a fast/dumb program is
better than most out there, but it still seems too many to me.



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.