Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: 0x88 board representation: Where is info?

Author: Vincent Diepeveen

Date: 07:43:42 04/04/01

Go up one level in this thread


On April 03, 2001 at 19:13:08, Ralf Elvsén wrote:

>On April 03, 2001 at 05:30:34, Travers Waker wrote:
>
>Until someone with a 0x88-program answers...
>
>>Hi
>>
>>I am trying to find some free info on how 0x88 board representation works, but
>>there seems to be hardly anything about it on the web.  Is 0x88 obsolete,
>>replaced by bitboard?
>
>I think not. As I understand it, most top programs don't use bitboards.
>In fact, the only examples I know for sure are Crafty and Ferret. Maybe
>I forgot some...

Oh well programs i suspect they do not use bitboards (if they do i
would be honored if programmer says so):
  DIEP
  Ferret
  The King
  Fritz
  Shredder
  Tiger
  Hiarcs
  Nimzo
  Junior
  Wchess
  Gandalf
  Rebel
  Virtual Chess
  SOS
  Mchesspro

Please add some i forgot here!

Programs using bitboards
  Crafty
  Zchess


Please add the list.

What i'm using is arrays similar to what is in gnuchess,
using the same names here though of course otherwise called in my
prog for biggest part :
  int board[64];   /* 7 different values  */
  int color[64];  /* 3 different values    */
  int quickboard[64];   /* 13 different values */
  int piecelist[2][32]; /* contains list for each side at which square
                           a piece is */
  int piececnt[2] /* number of pieces, king not counted */
  int indexarray[64]; /* gives index number i in piecelist[side][i] */

Note several speedups in implementation can be reached by for
example doing in root:
  piecelist[2][piececnt[side]] = -1;

Now you can loop over the pieces till -1.
Many of those speedups you can do which are in very little PD programs.


>>
>>Actually, I don't see these two (0x88 and bitboard) as competing with each other
>>- to me it looks like they could be used together.  Let me explain:
>>
>>Firstly, it seems to me to make no sense to store each individuals piece type's
>>current positions as a bitmap.  By this I mean, for example, representing the
>>current postition as a set of bitboards: WhiteKnights, BlackKnights,
>>WhiteBishops, BlackBishops, etc...  This just makes it more difficult to extract
>>the position of a particular piece, even using the famous x^(x-1) trick.  For
>>example, when generating moves for the white knight, one first has to determine
>>the number of the square it is on (using x^(x-1) trick on the WhiteKnight
>>bitboard) and then use this number to reference some pre-computed array of
>>knight attack boards.  What was gained by having the current position of the
>>white knight represented by a bitboard?
>>
>>Using a scheme like having a list of piece types and the square they currently
>>occupy seems to make more sense to me.  No x^(x-1) wizardry required.  I think
>>I read somewhere that Chess 4.5 did something like this.
>
>No need for wizardry if you use assembly for this (check out the source
>code for Crafty).
>
>>
>>So what bitboards would be useful as part of the current position?  I think it
>>may make sense to have BlackPawns and WhitePawns bitboards because you can
>>generate all the moves for all the pawns of a particular colour at once using
>>simple bit shifts (I think that's from David Eppstein's course).  I also think
>>the pawn bitboards could be useful in the avaluation function because it may be
>>easier to detect particular pawn patterns in the position using bitboards (I
>>haven't started writing my evaluation functions yet, so this is just a
>>suspicion).  You also definitely need two of AllPieces, WhitePieces and
>>BlackPieces (the third one can be generated from any of the other two at little
>>cost).  These are used to & (bitwise AND) with the attackboards that you look up
>>in your pre-computed arrays so that you can determine which moves are captures
>>and ignore illegal moves that involve capturing your own pieces.
>>
>>I think those should be the only bitboards in the current position
>>representation.  All the rest of the piece positions should be represented in
>>some other way in which it is easier to extract the current sqaure number of a
>>piece (i.e. no x^(x-1) required).  Am I wrong?
>
>Have no idea what is optimal, but my personal guess is that a lightweight
>use of bitboards could possibly be beneficial for a program.
>[snip]
>
>Ralf
>
>>Thanks for any help.
>>
>>Travers



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.