Author: Tord Romstad
Date: 06:12:54 09/01/03
Go up one level in this thread
On August 31, 2003 at 15:12:25, Uri Blass wrote:
>typedef struct tagPAWNHASHE
>{
> unsigned int key;
> unsigned int white_pawns_in_the_7th:8;
> unsigned int black_pawn_in_the_2th:8;
> BitBoard passedpawns[2];
>}
>PAWNHASHE;
Yes, that's a good start. This is how my pawn hash table entries look
at the moment (I am constantly adding new fields).
typedef struct {
p_hashkey_t key;
uint8 isolated_pawns[2][4]; /* Squares of isolated pawns for both sides */
uint8 double_pawns[2][4]; /* Squares of doubled pawns for both sides */
uint8 backward_pawns[2][4]; /* Squares of backward pawns for both sides */
uint8 passed_pawns[2][8]; /* Squares of passed pawns for both sides */
uint8 open_files[2]; /* Bitfields of open files for both sides */
uint8 ks_storm[2]; /* King side pawn storm eval for both sides */
uint8 qs_storm[2]; /* Queen side pawn storm eval for both sides */
uint8 ks_rook_files[2]; /* Good files for rooks when ks pawn storm */
uint8 qs_rook_files[2]; /* Good files for rooks when qs pawn storm */
uint8 bad_bishop_colour[2]; /* Bad bishop colour for both sides */
int8 lpf[2]; /* Leftmost pawn file for both sides */
int8 rpf[2]; /* Rightmost pawn file for both sides */
int8 pchain_bonus[2]; /* Bonus for pawn chains and phalanxes */
int8 centre; /* Type of centre */
uint8 pawns_on_w[2]; /* Pawns on white squares for both sides */
uint8 pawns_on_b[2]; /* Pawns on black squares for both sides */
uint8 central_pawns_on_w[2];/* Central pawns on white squares, both sides */
uint8 central_pawns_on_b[2];/* Central pawns on black squares, both sides */
uint8 blocked_pawns_on_w[2];/* Blocked pawns on white squares, both sides */
uint8 blocked_pawns_on_b[2];/* Blocked pawns on black squares, both sides */
uint8 blocked_central_pawns_on_w[2];
/* Blocked central pawns on white squares, both sides */
uint8 foo[55]; /* This is only here to make the structure 128 bytes big */
} p_hashentry_t;
The 'centre' field has a value which depends on the central pawn structure.
Possible values are OPEN, HALF_OPEN, HALF_CLOSED, CLOSED, TENSION,
UNRESOLVED, W_STONEWALL and B_STONEWALL. For each type of centre I evaluate
the position slightly differently (for instance, the penalty for not having
a good pawn shelter in front of the king is much bigger when the centre
is open). I plan to add many more types of central pawn structures in
the future.
>Should I have some global varaible
>int zobpawns for the key of the position in the board or maybe an array that
>tell me the zobrist key for every ply and local varaible is enough.
I use an array (for pawn hash keys as well as for normal hash keys). For
normal hash keys I use 64 bits, for pawn hash keys I use 32.
Tord
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.