Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fill & Floodfill (for Gerd)

Author: Gerd Isenberg

Date: 16:07:51 12/23/02

Go up one level in this thread


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.

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?

Regards,
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.