Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: About chess programming

Author: Vincent Diepeveen

Date: 04:52:42 12/23/99

Go up one level in this thread


On December 22, 1999 at 18:12:43, hgkjhg wrote:

>Hi,
>I started writing a program.  It was a running bug-free program.  But I want to
>mainly change its eval.c function.  The program initially doesn't have a lot of
>knowledge, but its speed is about 2.5 times slower than crafty's on a Pentium
>100.  The program uses regular 12x12 offsets for board representation, and it
>seems to be easy to add knowledge, but would the program be like 300% faster
>using bitboards?

Easiest and very fast is the gnuchess datastructure (but not the way
in which it generates)
for general code (so indexing black or white instead of hardcoding
everything for black and white):
  int board[64];          ==> 6 different types of pieces and a 0 for nothing
  int color[64];          ==> white,black,neutral
  int squarelist[2][16];  ==> squares where the pieces are
  int piececount[2];      ==> number of pieces for each side
  int Pindex[64];         ==> index to squarelist for a piece
  int HasMoved[64];       ==> you can also use smaller arrays. basically
                              it gives whether you can castle or whether a piece
                              has moved on that square.





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.