Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Proposal

Author: Vasik Rajlich

Date: 02:21:09 03/24/04

Go up one level in this thread


On March 23, 2004 at 16:44:21, Gerd Isenberg wrote:

>On March 23, 2004 at 16:25:52, Gerd Isenberg wrote:
>
>>On March 23, 2004 at 15:31:36, Gerd Isenberg wrote:
>>
>>>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...
>>
>>
>>BitBoard trappedBishopSquares = 0;
>>BitBoard tabu = GetOwnNoneMovablePawns() | ...;
>>BitBoard potb = ~tabu; // exclude tabu squares from the potential trapped
>>while ( potb ) {
>>  BitBoard ssqs  = potb & -potb;
>>  BitBoard a1h8  = getA1H8Attacks(ssqs) & ~tabu;
>>  BitBoard h1h8  = getH1H8Attacks(ssqs) & ~tabu;
>>  BitBoard a1h8E = getH1H8Attacks(a1h8) & ~tabu;
>>  BitBoard h1a8E = getA1H8Attacks(h1h8) & ~tabu;
>>  potb &= ~(a1h8 | h1h8 | ssqs);
>>  if ( a1h8E == 0 && h1a8E == 0 )
>>    trappedBishopSquares |= (a1h8 | h1h8 | ssqs);
>>}
>>
>>
>>Ok, there is still a lot to improve...
>
>BitBoard trappedBishopSquares = 0;
>BitBoard tabu = GetOwnNoneMovablePawns() | ...;
>BitBoard potb = ~tabu; // exclude tabu squares from the potential trapped
>while ( potb ) {
>  BitBoard ssqs  = potb & -potb;
>  BitBoard a1h8  = getA1H8Attacks(ssqs) & ~tabu;
>  BitBoard h1a8  = getH1A8Attacks(ssqs) & ~tabu;
>  BitBoard a1h8E = getH1A8Attacks(a1h8) & ~tabu;
>  BitBoard h1a8E = getA1H8Attacks(h1a8) & ~tabu;
>  potb &= ~(a1h8 | h1a8 | a1h8E | h1a8E | ssqs);
>  if ( a1h8E == 0 && h1a8E == 0 )
>    trappedBishopSquares |= (a1h8 | h1h8 | ssqs);
>}

Interesting, keep posting, we're watching :-)

I am slightly unclear on what exactly you are trying to do. If "immovable pawn"
is one which is absolutely fixed, as in Tord's position, then the penalties
should be huge, and they will almost never apply. If "immovable pawn" is one
which is just slightly more fixed, then the penalties should be mild and will
often apply. I'd much favor the second approach, but it won't help you solve the
extreme position.

Also note that Shredder does not solve this position. It has a hyper-optimistic
scoring for endgames, and the -1.4 score is nothing special. Put the bishop
"back" on c1, take away white's a-pawn, and I'm sure you'll get a score which is
even worse. In order to consider this solved, the score would need to be -3.0 or
so. I think it's just giving a general penalty for the bishop.

Vas



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.