Author: Bas Hamstra
Date: 01:05:30 01/10/03
Go up one level in this thread
On January 09, 2003 at 10:18:23, Uri Blass wrote:
>After I make a move of a white pawn I need to change only part of the bitboard
>of the pawns.
>
>Is there a more efficient way to do it then things like?
>
>if (side==LIGHT)
>{
> pawnattacksAH[LIGHT]=(pawnBB[LIGHT]<<9)&NOTFILEABB;
> pawnattacksHA[LIGHT]=(pawnBB[LIGHT]<<7)&NOTFILEHBB;
>...
>}
>else
>{
> pawnattacksAH[DARK]=(pawnBB[DARK]>>7)&NOTFILEABB;
>...
>}
>
>I remember that GCP told me that I can get the information from hash tables.
>
>Updating pawnBB after every make move that change the pawn structure is cheap so
>I do it but I wonder how can I get the information from hash tables when I do
>not want to use static scores for pawn structure but to use other information in
>the board to evaluate pawn structure.
>
>Should I start with doing it without caring about speed and only later care
>about storing the information that I need in hash tables?
>
>The information that I want first is squares of the passed pawns that are
>protected by pawns and square of the weak pawns of both sides.
>
>There is another information that today I remember without bitboard(number of
>pawns in every file)
>
>Should I change the way that I remember it to bitboard and if yes how to do it?
>
>Uri
Since you will probably evaluate each pawn anyway, you can keep counters of
pawns at every file. I do that (and I use rotated bitboards). I store an 3
character arrays in my pawnhashtable: WPawnsOnFile[8] BPawnsOnFile[8] and
KingSafety[8]. If white castled short and black long, KingSafety[1] will give me
white's kingsafety and KingSafety[6] gives black's KingSafety.
Bas.
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.