Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboards vs Mailbox vs 0X88

Author: Steven J. Edwards

Date: 11:07:17 06/02/98

Go up one level in this thread


On June 02, 1998 at 13:58:38, Robert Hyatt wrote:

>On June 02, 1998 at 13:48:57, Bruce Cleaver wrote:

>>What kind of performance speedup can I expect by switching from a
>>'mailbox' move generator to a bitboard based one?  I realize it is
>>implementation-dependent, but a rough estimate is what I am looking
>>for...

>most likely, *none*.  Bitboards really don't provide anything useful
>as far as move generation goes, "today".. because everything is done
>with 64 bit words.  If you move to a 64 bit architecture, then they
>begin to pay off, but on 32 bit machines, they likely just "break
>even."

The OCD toolkit has both offset (mailbox) and bitboard routines. For teh
processes of move generation, execution, leagilty testing, and
retraction, the offset method wins out in speed by a ratio of 4 to 7 (or
7 to 4, depending on your viewpoint).

>But there are some things you can get easier:  you can generate just
>captures without looping over the empty squares.  Evaluation tests can
>be turned into simple and/or/xor operations.  IE you can do one single
>AND operation to ask "is a pawn on square x passed?"  But it takes a
>while
>to get into this "mode" of thinking.

This is why I believe that bitboards are the way to go for a main
search; the positional evaluation is much more flexibly done and special
move generation is easier.  An example of the latter: generation of
check evasion moves.  Having a special bitboard routine for this makes
it straightforward and a big speed improvement for those positions.

>So don't expect miracles... just a different approach that offers some
>things that offset representations don't.  And the converse is also true
>in some cases...

So, I recommend having both representations in a program, and select
according to functional requirements.

-- Steven (sje@mv.mv.com)




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.