Author: Uri Blass
Date: 16:25:11 12/17/02
Go up one level in this thread
On December 17, 2002 at 18:57:20, Gerd Isenberg wrote: ><snip> >>>Hi Uri, >>> >>>OK you have pawnBB[2] with white pawns pawnBB[WHITE] and black pawns >>>pawnBB[BLACK]. "allPawns" combines both sets by or. >>> >>>Some pawn-patterns on the fly (I'm at work and can't look to my sources): >>> >> >>Thanks for the information >> >>I thoughtabout your post and understood part of it. >>Here are my comments when I tried to explain it to myself. >>At this moment I did not understand what is the meaning of duo >>and there were some other things that I did not understand. > > >OK, i made some mistakes on the fly and try to correct or comment. > >Some of the terms are german introduced by the austrian Chess Master H.Kmoch in >"Die Kunst der Bauernführung". > >Widder, Hebel and Duo: > >[D] 8/6pp/8/1p2p3/1P1P4/6PP/8/8 w - - > > > >> >>>pawnAttacksAH[WHITE] = (pawnBB[WHITE] << 9) & 0xfefefefefefefefe; >> >> >>for me a1=0... h1=7 a2=8...h8=63 > >Yes. > >pawnAttacksAH[WHITE] = (pawnBB[WHITE] << 9) & NOTFILEABB; > >... all white pawn attacks from a to h direction. Due to wrap around of pawns >from h to a-file by shift up (<<8) and left (<<1, means board right here from >whites point of view!) it is necessary to clear these possible wrapped bits by >anding with a not a-file bitboard. > >With mmx-registers anding with NOTFILEABB is not necessary due to bytewise >(rankwise) add (paddb mm1,mm1) instead of shift left one. > > >> >>suppose we are in the opening position >>I guess pawnBB[WHITE]=(1<<8)+(1<<9)+...(1<<15) >> >>pawnsBB[white]<<9=(1<<17)+(1<<18)+...(1<<24) >>0xfefefefefefefefe helps to get rid of the 1<<24 because fe mean 1 only at files >>b-h >>>pawnAttacksHA[WHITE] = (pawnBB[WHITE] << 7) & 0x7f7f7f7f7f7f7f7f; >> >>here we need to get rid of h4 that is not attacked >> >>7f is 1 in files a-g so it help for this target. >> >>>pawnAttacks[WHITE] = pawnAttacksAH[WHITE] | pawnAttacksHA[WHITE]; >>>pawnDblAttacks[WHITE] = pawnAttacksAH[WHITE] & pawnAttacksHA[WHITE]; >> >>understood >> >>squares that are attacked by 1 pawn and squares that are attacked by 2 pawns. >> >>> >>>hebel[WHITE] = pawnAttacks[WHITE] & pawnBB[BLACK]; >> >>black pawns that are attacked by white pawns. > > > >Yes, but my definition was wrong. That are the black "hebel"-pawns. > >hebel[WHITE] = pawnBB[WHITE] & pawnAttacks[BLACK]; >hebel[BLACK] = pawnBB[BLACK] & pawnAttacks[WHITE]; > > > > >> >>>widder[WHITE] = (pawnBB[WHITE] << 8) & pawnBB[BLACK] >> >> >>If I understand correctly blocked white pawns by black pawns with distance of >>one square. > >Yes, i also changed colors here > >widder[WHITE] = pawnBB[WHITE] & (pawnBB[BLACK] >> 8); >widder[BLACK] = pawnBB[BLACK] & (pawnBB[WHITE] << 8); > >> >>> /* & ~hebel[WHITE] */; >>>defended[WHITE] = pawnAttacks[WHITE] & pawnBB[WHITE]; >> >>understood. >>>duo[WHITE] = ((pawnBB[WHITE]<<8)& pawnAttacks[WHITE] >>> & ~pawnDblAttacks[WHITE]) >> 8; >> >>What does it mean? > > >Duos are two pawns of same color on neighboared files and same rank. >A duo-pawn is a pawn whose advance square is controlled exactly by one (but not >two) neighboared pawn. > > > >>> >>>Some helpfull routines: >>> >>>BitBoard fillUp(BitBoard bb) >>>{ >>> bb |= (bb<<8); >>> bb |= (bb<<16); >>> bb |= (bb<<32); >>> return bb; >>>} >>> >>>BitBoard fillDown(BitBoard bb) >>>{ >>> bb |= (bb>>8); >>> bb |= (bb>>16); >>> bb |= (bb>>32); >>> return bb; >>>} > >Kogge-Stone generator routines introduced by Steffan Westcott. > >I give two epd-strings representing the source bb and the return bitboard for >fillUp: > >[D] 8/8/8/1P6/4PP2/8/7P/8 w - - >[D] 1Q2QQ1Q/1Q2QQ1Q/1Q2QQ1Q/1P2QQ1Q/4PP1Q/7Q/7P/8 w - - > > >> >>I guess that fillup(pawnBB[WHITE]) gives me all the squares that white pawn can >>visit without captures by pawns >>I will say later in this post that these are the squares that the white pawns >>"see" when filldown(pawnBB[BLACK]) are the square that black pawns "see" >>correct? >> >> ><snip> >>I do not understand why white pawns cannot be in these files. >> >>Uri > >OK, forgot the last errornous routines, this should be better and easier: > >openPawns[WHITE] = pawnBB[WHITE] & ~filldown(allPawns); >passedPawns[WHITE] = pawnBB[WHITE] & ~filldown(allPawns|pawnAttacks[BLACK]); >notDefendable[WHITE] = pawnBB[WHITE] & fillup(pawnAttacks[WHITE]); > >OpenPawns: All pawns without own or opposite pawns infront on same file. > >Backward pawns: > >First we need all squares dominated by sides pawn attacks: > >pawnDomination[side] = (pawnDblAttacks[side] & ~pawnDblAttacks[other(side)]) > | (pawnAttacks[side] & ~pawnAttacks[other(side)]); > >backWard1[WHITE] = notDefendable[WHITE] & (pawnDomination[BLACK] >> 8); >backWard2[WHITE] = backWard1[WHITE] & openPawns[WHITE]; > > >I hope this helps a bit and gives you an impression of the compution of >pawn-bitboard pattern. Your questions 4) affects more singular properties of a >pawn. >But even here Kogge-Stone-Up/Down fill (the passers as generator g, own attacks >as propagator p) may be helpfull to get a set of the closest possible defenders >(for each passer simultaniously). > >Steffan Westcott's routines for this purpose: > >BitBoard FillUpOccluded(BitBoard g, BitBoard p) >{ > g |= p & (g << 8); > p &= (p << 8); > g |= p & (g << 16); > p &= (p << 16); > return g |= p & (g << 32); >} > >BitBoard FillDownOccluded(BitBoard g, BitBoard p) >{ > g |= p & (g >> 8); > p &= (p >> 8); > g |= p & (g >> 16); > p &= (p >> 16); > return g |= p & (g >> 32); >} > >Question 5 is a bit unclear to me, i guess you mean candidates? >May you post some sample epd-strings? > >Gerd I admit that it is hard to define it for specific pawns and I guess that it may be better to evaluate it only for a set of pawns. I meant cadidares to be passer pawns Here are some examples: [D]k5K1/8/8/2p5/1p1p4/1P6/2P4P/8 b - - 0 1 black can generate a passed pawn but needs to sacrifice 2 pawns for that target. c4 bxc4 d3 or c4 dxc4 b3 [D]k5K1/8/8/2pp4/1p6/1P6/2P4P/8 b - - 0 1 black does not need to sacrific to generate a passed pawn(again I see no way to define exactly which pawn is the candidate to be passed pawn for evaluation). Uri Uri
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.