Author: Gerd Isenberg
Date: 12:31:36 03/23/04
Go up one level in this thread
On March 23, 2004 at 13:21:33, Anthony Cozzie wrote:
>After seeing Joachim's post that SMK solves this, I thought for about 5 seconds,
>and realized it isn't as hard as I thought.
>
>Step 1. Compute immovable pawnstructure. My guess is that he does this anyway.
>
>So here we recognize that that E3-F2-G3 is completely locked. This is not too
>hard to do, although I haven't worked out the mechanics completely.
>
>Step 2. Compute trappable squares.
>
>We simply floodfill from each square, and count the number of squares it can
>reach. This would be very slow, but we can speed it up as follows:
>
>We divide the board into 4 symmetric regions. (a piece will never get trapped on
>the center)
>
>Example: E1, F1, G1, H1, G2, H2, H3, H4
>
>We then check for at least 1 immoveable pawn, before floodfilling in that
>region.
>
>Step 3. Store into the pawn hash.
>
>And now we have a very quick test to determine if a piece can be trapped. This
>will cull out 99.999% of references.
>
>anthony
Interesting idea to hash trappable squares by pawn structure!
One has to distinguish between bishop-, rook- and queen-fills.
What about this idea:
Two 90 degree rotated bishop or rook attack kogge-stone fills, excluding tabu
squares. If both sets are empty, there is a potentially trapped bishop square.
Something like this:
bool isTrappedBishopSquare(BitBoard singleSquareSet, BitBoard tabu)
{
BitBoard a1h8 = getA1H8Attacks(singleSquareSet) & ~tabu;
BitBoard h1h8 = getH1H8Attacks(singleSquareSet) & ~tabu;
// consider popCount (a1h8E | h1a8E)
BitBoard a1h8E = getH1H8Attacks(a1h8) & ~tabu;
BitBoard h1a8E = getA1H8Attacks(h1h8) & ~tabu;
return ( a1h8E == 0 && h1a8E == 0 );
}
For all potentially squares of interest...
The questions are about the tabu sets.
Own blocked and backward pawns, or better, blocked pawns neither defendend or
defendable by own movable pawns? What about enemy pawn attacks? Considering
levers and rams? Static versus dynamic pawn structure...?
That's all pawn hashable.
If the above routine returns true, but ( ( a1h8 | h1h8 ) != 0 ), isn't that set
implicitly subset of potentially trapped squares too?
Considering pieces and expanding the tabu sets by already deteceted trapped or
bounded pieces in several runs is another theme...
Gerd
This page took 0.01 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.