Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Mixing 0x88 and bitboards

Author: Russell Reagan

Date: 14:28:10 06/25/02

Go up one level in this thread


On June 25, 2002 at 17:04:43, Robert Hyatt wrote:

>What about more commonly:  Is the black pawn on e6 passed.  Now you have
>to check 12 squares...  d2/e2/f2, d3/e3/f3, d4/e4/f4, d5/e5/f5.
>
>Bitmaps:  two loads one and.  No compare.  Just a branch not zero.
>
>traditional...  12 loads 12 compares.

Better would be (I think) to maintain a list of pieces, and check if there are
any opposite colored pawns on the d, e, or f file. Assuming that you have a
piece list and a pawn list, and that each remains "sorted" (pawns on a file are
in lower indexes, pawns on h files are in higher indexes) you could probably
create some system that would allow you to only test a few of the pawns.

Of course, this still isn't faster than bitboards, but it's better than 12 loads
and 12 tests (I think). And as another poster said, you could use pawn
hashtables to compute this.

And as for the original testing if there is a pawn on E6, don't you keep a
64-square array anyway along with your bitboards? If so, is there anything that
a classical approach can do more efficiently than a bitboard approach? Edge
detection and attack detection seem to be two of 0x88's typical strong points,
but I don't see how they would be faster than bitboards. Or is this a matter of
the hardware you use? Ex. 32-bit hardware, it might be close...64-bit hardware,
bitboards faster for everything...?

Russell



This page took 0.01 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.