Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: pawn structure, pawn hash, square-of-pawn, pawn-races

Author: Gerd Isenberg

Date: 11:20:32 08/20/04

Go up one level in this thread


<snip>
>>
>>Bitboards don't need any subtraction, any correction for side to move, nor even
>>the exact king square.  It looks something like this:
>>
>>if (white_pawn_race[square of white pawn] & BlackKing) pawn can't run.
>
>Funny, i index with the square of Black King,
>but "and" with a set of all white passers instead ;-)
>
>
>passedPawnsOutsideSquareOfKing[WHITE] =
>     passedPawns[WHITE] & sOutsideSquares[WHITE][bKingSq][color2move];
>
>with passedPawns[WHITE] probably stored in pawn-hash table or generated on the
>fly with some 64-bit instructions:
>
>passedPawns[WHITE] = pawns[WHITE] & ~filldown(allPawns|pawnAttacks[BLACK]);
>
>BitBoard fillDown(BitBoard b)
>{  // Kogge-Stone parallel prefix algorithm
>   b |= b >> 8;
>   b |= b >> 16;
>   b |= b >> 32;
>   return b;
>}
>

Since passed pawns are most often rarely populated, i admit that traversing  all
passers by bitscan and looking for geometrical and distance properties square
centric wise is probably more efficient. Otherwise i like this bitboard centric
setwise instructions ;-)

I admit that seeing a huge static advantage due to two white passers outside
blacks king square in pawn endings has some pitfalls. One should strongly
consider two more advanced passers even if both inside square:

[D]8/8/8/8/3p2PP/3K1p2/8/1k6 w - -



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.