Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: bitboard vs 0x88 again?

Author: Sune Fischer

Date: 06:18:51 10/08/03

Go up one level in this thread


On October 08, 2003 at 08:17:17, Tord Romstad wrote:

>On October 08, 2003 at 06:33:00, Sune Fischer wrote:
>
>>What are the many advantages of 0x88-like systems?
>
>I suppose what I use can be described as a "0x88-like system", although I use
>the &0x88 trick just a few times during program startup to initialise some
>tables.
>
>My board is an array with 256 entries, visualised as a 16x16 board where
>the real chess board occupies the left half of the middle eight ranks.  I
>use the "mailbox" technique for edge detection; all squares outside the
>real board contain the value OUTSIDE.  Originally I used a 10x12 board
>like in most other mailbox programs, but I switched to 16x16 in order
>to be able to detect the geometrical relationship between two squares
>with a simple minus operation (like in 0x88 programs).  As Russell once
>pointed out in an e-mail, I could just as well have used a 16x13 board
>with three ranks below the board and two ranks above it, but I'm to
>lazy to change it.
>
>I don't know much about the "many advantages".  My main reason for this
>board representation is that it is extremely simple to use, and that
>the code is clear and easy to understand.

Heh, that would be my reason to use bitboards :)

The good thing about bitboards IMO, is that all the complexity is located in the
initializing of the attack boards (if you use rotated).

The parts one needs to work with a lot is kept clean and simple instead of being
littered with loops everywhere.

Oh well, individual taste can't be debated I guess.

> I also find the above-mentioned
>ability to easily determine geometrical relationships to be very
>convenient.  It is possible that other board representations could
>enable me to do certain operations a bit faster, but at the moment what
>I have is fast enough (my program is slow as a tortoise, but not because
>of the board representation).

There is just one thing about the geometrical relations I don't understand.

Suppose you do
dir = sq1-sq2+128 (in 0x88)

then dir is going to be some multiply of the direction and not (usually) the
step size needed for the board scan in the direction of dir.

So if one needs a table lookup in any cas, what's the great advantage over the
smaller 64 sized board?

-S.

>Tord



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.