Author: Uri Blass
Date: 16:51:42 05/07/04
I looked at the code of Crafty to understand what it does when it creates the
opening book(the function BookUp()).
1)I see that it it is using malloc to allocate memory.
I have no malloc in movei and I use calloc to allocate hash tables.
I find that Crafty has no calloc but many malloc and my question is if there is
a reason for that.
2)I understand that crafty first translate pgn to book positions but I do not
see moves in the following structs
typedef struct {
BITBOARD position;
unsigned int status_played;
float learn;
int CAP_score;
} BOOK_POSITION;
typedef struct {
unsigned char position[8];
unsigned char status;
unsigned char percent_play;
} BB_POSITION;
My question is where does Crafty save the moves.
I remember that I read that another program (Tao) save only positions in the
book but it seems to me a bad idea for reasons that Dieter gave because the
program may go to a book position instead of playing a better move.
book should include positions and moves.
3)If I understand correctly Crafty first remember the book in a big array and
only later sort the big array by BookSort and later copy it to a file.
I do not understand what BookUpNextPosition does and what reason there is to
return the least (lexically) position key.
If I want to put a new position in the book I need to put it in the right place
and I do not understand how the least hash key can help me.
Uri
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.