Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question for you 0x88 folks

Author: Dann Corbit

Date: 13:12:11 03/24/04

Go up one level in this thread


On March 24, 2004 at 15:57:50, Russell Reagan wrote:

>On March 24, 2004 at 15:23:26, Dann Corbit wrote:
>
>>A lot of people seem to use the 16x8 board with 0x88.
>>
>>Very vew people seem to use the other half for anything useful.
>>
>>I am wondering, does anyone use the other half of the board to store data about
>>the square it duplicates?
>>
>>Seems like a very obvious enhancement to me.
>
>When I have used 0x88-like approaches, the board is an array of pointers to
>piece structs, so I can add whatever I need to the piece struct. The size of the
>struct doesn't matter. I only shorten it after an actual game move has been made
>(not after every search move, which is something I would also like to try, but
>then the piece struct cannot be much bigger than 32-bits). An example of what I
>might do:
>
>struct Piece
>{
>    int color;
>    int type;
>    int square;
>    int status; // captured?
>};
>
>Piece * board[256];
>// Only one of the following
>Piece   piece_list[2][16]; // [color][index]
>Piece * piece_list[2][6];  // [color][type][index]
>
>
>The other approach is to have the board be an array of piece values and have an
>array of occupied squares. I like to scan the piece lists so I use pointers.
>Something like this:
>
>int board[256];
>int occupied[2][16]; // index of an occupied square [color][index]
>
>I think that using the other half of the board would only be useful if you used
>and approach where the size of the piece information mattered. For instance, in
>the first approach if I shortened the piece list after every capture in the
>search, I wouldn't want to copy around big structs. In the second approach, you
>don't want to copy around a lot of piece info either so you are limited to
>32-bits (or whatever the CPU register width is).
>
>What are your thoughts? How might you use the other half of the board?

One obvious thing is a safety indicator.  With a bunch of attack data analyzed,
you can say that a square is safe for a white pawn to step on (after imaginary
SEE) or a black knight, or whatever.  So in move ordering, the unsafe squares go
last.

Actually, you can stick anything that is "element sized" or smaller into it.
The reason I thought of using it is that the whole board will probably be in the
cache and so the other 64 integers will be available at high speed and with
simple addressing.



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.