Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: To bitboard or not to bitboard?

Author: Uri Blass

Date: 06:56:15 09/01/03

Go up one level in this thread


On September 01, 2003 at 09:12:54, Tord Romstad wrote:

>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 */

number of isolated pawns may be more than 4 for one side because it is possible
that one side has more than one isolated pawn in the same file.
What do you do in that case?

>  uint8 double_pawns[2][4];   /* Squares of doubled pawns for both sides */

again what you do in case that white has pawns at e2,e3,e4,a2,a3.

>  uint8 backward_pawns[2][4]; /* Squares of backward pawns for both sides */

I do not evaluate backward pawns.
What is your definition?

>  uint8 passed_pawns[2][8];   /* Squares of passed pawns for both sides */
>  uint8 open_files[2];        /* Bitfields of open files for both sides */

Do you define open file for white as file without white pawns?

>  uint8 ks_storm[2];          /* King side pawn storm eval for both sides */
>  uint8 qs_storm[2];          /* Queen side pawn storm eval for both sides */

How do you evaluate king side pawn storm and queen side pawn storm based on pawn
structure?

>  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 */

How do you evaluate it?

>  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 */

How do you evaluate pawn chains and what is phalanx?

>  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.

It seems that you are a very strong player.
My rating is close to 2000 but I never thought about centre in these
definitions.

I do not consider myself to be good enough to know when to give a bonus and even
if I know when to give a bonus I need to test first because even if something is
good the bonus may be counter productive if it is too big
or if this bonus is already calculated for different reasons.

For example you may punish bad bishop not directly for mobility reasons and if
you add special evaluation for bad bishop then it may be counter productive
because your evaluation is too much when it punishes the bad bishop twice.

>
>>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

I guess that you update your hash key when you make move.
How do you do it?

Do you use your array or do you define a local varaible?

Same question for using your hash key when you probe the hash tables or record
position in the hash tables.


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.