Author: Bas Hamstra
Date: 10:32:44 12/24/02
Go up one level in this thread
On December 24, 2002 at 07:35:03, Gerd Isenberg wrote:
>On December 23, 2002 at 20:31:46, Bas Hamstra wrote:
>
>>On December 23, 2002 at 19:33:50, Bas Hamstra wrote:
>>
>>>On December 23, 2002 at 19:07:51, Gerd Isenberg wrote:
>>>
>>>>On December 23, 2002 at 16:13:21, Bas Hamstra wrote:
>>>>
>>>>>Gerd,
>>>>>
>>>>>Those fill routines are really neat. I have a few tiny enhancements and am
>>>>>working on more. How about this:
>>>>>
>>>>>// determine where white pawns can go safely, with a floodfill up:
>>>>>WSafePath = FFillUp(WPawns, ~(AllPawns|BDominated) );
>>>>>
>>>>>// now we can calc "pawn-defendable" more accurately:
>>>>>WDefendable = ((WPawnAttacksRight >> 16) & WSafePath) << 7 |
>>>>> ((WPawnAttacksLeft >> 16) & WSafePath) << 9 ;
>>>>>
>>>>>// to be used in backward pawns:
>>>>>WBackWard = ((~AllPawns & BDominated) >> 8) & WPawns & ~WDefendable;
>>>>>
>>>>>Best regards,
>>>>>Bas.
>>>>
>>>>Hi Bas,
>>>>
>>>>Wow, absolutely great!!!
>>>>Pawn-defendable is really more accurate.
>>>>
>>>>I guess FFillUp(g, p) is Steffan's FillUpOccluded and WPawns are therefore
>>>>member of WSafePath.
>>>
>>>Yes, that is 100% correct. I played with this routines to check the speed of the
>>>non-mmx versions, but it seems then I have a "wrap-around" problem?
>>>
>>>>BitBoard FFillUp(BitBoard g, BitBoard p)
>>>>{
>>>> g |= p & (g << 8);
>>>> p &= (p << 8);
>>>> g |= p & (g << 16);
>>>> p &= (p << 16);
>>>> return g | (p & (g << 32));
>>>>}
>>>>
>>>>What do you think about (2.rank) pawns thay may push safely one step foreward,
>>>>but became backward afterwards?
>>>
>>>Yes, I have been thinking about this too, but it gave me a headache :-) Because,
>>>what to say about pawns that become backward if 3 squares advanced? What is the
>>>definition of backward pawn, in fact? Is a pawn on the third rank counted as
>>>backward if it would be backward if 2 squares advanced?
>>>
>>> WELL??
>>>
>>>:-)
>>>
>>>Best regards,
>>>Bas.
>>
>
>Hi Bas,
>
>Even if your code produces not exactly a set of backward pawns per definition, i
>find the FillUpOccluded rather smart to get weak "backward like" pawns.
>I agree with Russell and Bob here, don't worry about the exact definition.
>
>A "real" backward pawn is a candidate (open pawn, no opposite pawn on stop- or
>advanced stop squares) with a definitely weak stop square. Otherwise, if the
>pawn is not open but not blocked, it is a disguised backward pawn by the
>definition of Kmoch.
>
>My current implementation is like
>
>notDefendable[WHITE] = pawnBB[WHITE] & ~fillUp(pawnAttacks[WHITE]) & ...;
>backWard1[WHITE] = notDefendable[WHITE] & (pawnDomination[BLACK] >> 8);
>backWard2[WHITE] = backWard1[WHITE] & openPawns[WHITE];
>
>But later i do a second pass, building a weaker notDefendable[WHITE] set,
>excluding blocked and backWard defences in fillUp so far. Getting a kind of weak
>pawn set with is similar to your definition.
>
>I always exclude blocked widder pawns, duo pawns and hebel pawns from the
>property being backward. But of course, none defendable widder pawns are also
>most often weak.
>
>I also consider white pawns on the 2.rank as "backward" or better weak, if they
>may advance but are really backward afterwards. But the penalty is shlightly
>smaller. No further steps, but i evaluate some vertical pawn fragmentation.
>
>
>>- - - - - - - -
>>- - B B B B - -
>>- - - - - - - -
>>- - - W W - - -
>>- - - - - - - -
>>- - - - - - - -
>>- - - - - - - -
>>- - - - - - - -
>>
>>Are these 2 white backward pawns? Neither can advance, neither be defended.
>
>Because of duo pawns, no backward pawn here. But isolated duos may also
>considered weak, due to the domination of the stop squares. Bur that's another
>pattern, like "hängende Bauern":
>
>- - - - - - - -
>B B B - - B B B
>- - - - - - - -
>- - - - - - - -
>- - - W W - - -
>- - - - - - - -
>W W - - - - W W
>- - - - - - - -
>
>If one advances, the other became backward:
>
>- - - - - - - -
>B B - - - B B B
>- - B - - - - -
>- - - - W - - -
>- - - W - - - -
>- - - - - - - -
>W W - - - - W W
>- - - - - - - -
>or
>- - - - - - - -
>B B B - - - B B
>- - - - - B - -
>- - - W - - - -
>- - - - W - - -
>- - - - - - - -
>W W - - - - W W
>- - - - - - - -
>
>>
>>- - - - - - - -
>>- - - B - - - -
>>- - - - - - - -
>>- - - - W - - -
>>- - - - B - - -
>>- - - - - - - -
>>- - - W - - - -
>>- - - - - - - -
>>
>>How many backward white pawns?
>
>No real one. But d2 is a disguised backward.
>All pawns should be considered weak.
>But how much? If we shift d7 to f7, d2 becomes a real backward pawn with a
>greater penalty. The weak e5 pawn is an advanced candidate. Even if the open,
>backward-like penalty is greater than the disguised backward paenalty of d2, i
>guess the value of e5 shuld be greater than d2. But may be i'm wrong here.
>
>>
>>- - - - - - - -
>>- - - B - - - -
>>- - - - - - - -
>>- - - - - - - -
>>- - - - - - - -
>>- - - - - - - -
>>- - - - W - - -
>>- - - - - - - -
>>
>>Is this a backward white pawn? Can backward pawns ueberhaupt be isolated?
>
>Yes, backward and isolated don't contradict. One could say both pawns are
>candidates to get backward here. Pawns with this property on the backrank should
>hurry to reach the 4. ro 5. rank to make the opponent backward. So a shlight
>backrank (or 3.rank) penalty for candidates would be fine.
>
>Regards,
>Gerd
>
>
>>
>>I have had this more often. I keep seeing complications and eventually I don't
>>even know what a backward pawn actually is and therefore chose a trivial
>>definition. In books you typically see only this.
>>
>>- - - - - - - -
>>- - - - - - B -
>>- - - - - B - -
>>- - - W - - - -
>>- - - - W - - -
>>- - - - - - - -
>>- - - - - - - -
>>- - - - - - - -
>>
>>
>>
>>Best regards,
>>Bas.
Ok, let's say I define weak pawns as ALL pawns that are fundamentally
pawn-indefendable. Then:
WDominated = (WPawnAttacks) & ~BPawnAttacks;
WDominated |= (WPawnAttacksLeft & WPawnAttacksRight) &
~(BPawnAttacksLeft & BPawnAttacksRight);
BDominated = (BPawnAttacks) & ~WPawnAttacks;
BDominated |= (BPawnAttacksLeft & BPawnAttacksRight) &
~(WPawnAttacksLeft & WPawnAttacksRight);
//Square where white pawns can safely advance to
WSafePath = FFillUp(WPawns, ~(AllPawns | BDominated) );
//If *another* pawn can safely advance to a place where it defends *this*
//pawn, this pawn is not weak:
WDefendable = (((WPawnAttacksRight >> 16) & WSafePath) << 7) |
(((WPawnAttacksLeft >> 16) & WSafePath) << 9);
//And if *this* pawn can safely run to a point where it is pawn-defended,
//it is not weak:
WDefendable |= FFillDown(WPawnAttacks, ~(BPawns|BDominated) );
// Result:
WWeakPawns = WPawns & ~WDefendable.
Seems to get what I want at first glance :-)
Best regards,
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.