Computer Chess Club Archives


Search

Terms

Messages

Subject: Selecting the best board representation (excluding bitboards)

Author: Nicolas Carrasco

Date: 19:29:17 11/09/99


Dear Guys,

I have tryed to build a move generator using a single a array faster than TSCP.
(I know how to increase a bit TSCP gen), and it seems that for move-generator is
better a pair of arrays, but I guess to know if it is the same or equal speed
for an eval function. I know that this depends of how you do that ,but try to
answer considering your experince.

Maybe a pair of 64 int arrays is slower than a single one for eval functions
and/or hashing functions.

 I am asking you this in order to select the apropiate board representation for
a long time before going to bitboards.

I also found an interesting board representation that uses this:

{      0,   1,   2,   3,   4,   5,   6,   7,
  __,  __,  __,  __,  __,  __,  __,  __,
  16,  17,  18,  19,  20,  21,  22,  23,
  __,  __,  __,  __,  __,  __,  __,  __,
  32,  33,  34,  35,  36,  37,  38,  39,
     __,  __,  __,  __,  __,  __,  __,  __,
  48,  49,  50,  51,  52,  53,  54,  55,
     __,  __,  __,  __,  __,  __,  __,  __,
  64,  65,  66,  67,  68,  69,  70,  71,
     __,  __,  __,  __,  __,  __,  __,  __,
  80,  81,  82,  83,  84,  85,  86,  87,
     __,  __,  __,  __,  __,  __,  __,  __,
  96,  97,  98,  99, 100, 101, 102, 103,
     __,  __,  __,  __,  __,  __,  __,  __,
 112, 113, 114, 115, 116, 117, 118, 119 } // THE MAP TO CALCULATE THE VECTORS

int initial_board[120]=
{
     BR,  BN,  BB,  BQ,  BK,  BB,  BN,  BR,
  __,  __,  __,  __,  __,  __,  __,  __,
  BP,  BP,  BP,  BP,  BP,  BP,  BP,  BP,
  __,  __,  __,  __,  __,  __,  __,  __,
  XX,  XX,  XX,  XX,  XX,  XX,  XX,  XX,
     __,  __,  __,  __,  __,  __,  __,  __,
  XX,  XX,  XX,  XX,  XX,  XX,  XX,  XX,
     __,  __,  __,  __,  __,  __,  __,  __,
  XX,  XX,  XX,  XX,  XX,  XX,  XX,  XX,
     __,  __,  __,  __,  __,  __,  __,  __,
  XX,  XX,  XX,  XX,  XX,  XX,  XX,  XX,
     __,  __,  __,  __,  __,  __,  __,  __,
  WP,  WP,  WP,  WP,  WP,  WP,  WP,  WP,
     __,  __,  __,  __,  __,  __,  __,  __,
  WR,  WN,  WB,  WQ,  WK,  WB,  WN,  WR

};

BP,WP,....,..., are number definitions :)

the "__" are elements are not being used.

here I skip the mailbox check doing :

#define BOARD(z)             ((z&0x88)==0) /* To check if a position z is inside
the board */

So if I put
gen()
{
    if(BOARD(any_position)) /// I SAVE THE MAILBOX FUNCTION
        THIS IS A LEGAL MOVE
}

The problem that I founded here is that I have to eat 64 unused
elements or run an if statement to skip them, and that slows too much.

Thanks




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.