Defended+Pawns+(Bitboards)

toc
 * Home * Board Representation * Bitboards * Pawn Pattern and Properties * Defended Pawns**

Working in the bitboard centric world to determine pawn related pattern set-wise.

Each pawn, member of the own pawn attack set is obviously defended by a pawn, thus likely not a winning capture target for opponent pieces (except pawns). If a defended pawn is open, opponent rooks on half-open files bang one's head against a brick wall.

 =Defended= Again, it is advantageous to keep disjoint east-west attack sets for a unique 1:1 source-target relationship. On demand we can use the union or intersection on the fly. Note that attack direction is related to the target square. East attack is from south/north-west to north/south-east code white pawns        defended            defended from west ->       from east <- . . . . . . . .    . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . 1 . . .     . . . . 1 . . .     . . . . . . . . . . . 1 . . 1 .     . . . 1 . . . .     . . . . . . 1 . . . 1 . . . . 1     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . code

code format="cpp" U64 wPawnDefendedFromWest(U64 wpawns) { return wpawns & wPawnEastAttacks(wpawns); }

U64 wPawnDefendedFromEast(U64 wpawns) { return wpawns & wPawnWestAttacks(wpawns); } code

 =Defenders= To get the set of defenders on the fly, we use the intersection of white pawns with it's "black" attacks: code white pawns        defenders           defenders from west          from east . . . . . . . .    . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . 1 . . .     . . . . . . . .     . . . . . . . . . . . 1 . . 1 .     . . . 1 . . . .     . . . . . . . . . . 1 . . . . 1     . . 1 . . . . .     . . . . . . . 1 . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . code

code format="cpp" U64 wPawnDefendersFromWest(U64 wpawns) { return wpawns & bPawnWestAttacks(wpawns); }

U64 wPawnDefendersFromEast(U64 wpawns) { return wpawns & bPawnEastAttacks(wpawns); } code Otherwise, if the set of defenders was already determined (or vice versa), we can already take advantage of the unique target/source relation ship: code format="cpp" wPawnDefendersFromWest = wPawnDefendedFromWest >> 9; wPawnDefendersFromEast = wPawnDefendedFromEast >> 7; code

 =Defended Defenders= Defended defenders already are the inner pawns of a at least triple-chain, the d5 pawn for instance: code white pawns        defended            defended from west          from east . . . . . . . .    . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . 1 . . .     . . . . 1 . . .     . . . . . . . . . . . 1 . . 1 .     . . . 1 . . . .     . . . . . . 1 . . . 1 . . . . 1     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . ..

white pawns        defenders           defenders from west          from east . . . . . . . .    . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . 1 . . .     . . . . . . . .     . . . . . . . . . . . 1 . . 1 .     . . . 1 . . . .     . . . . . . . . . . 1 . . . . 1     . . 1 . . . . .     . . . . . . . 1 . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . ..

defenders and      defenders and white pawns        defended            defended from west          from east . . . . . . . .    . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . 1 . . .     . . . . . . . .     . . . . . . . . . . . 1 . . 1 .     . . . 1 . . . .     . . . . . . . . . . 1 . . . . 1     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . code

 =Not Defended Defenders= Not defended defenders are the base of a chain - target of opponent attacks: code not defended       not defended white pawns        defenders           defenders from west          from east . . . . . . . .    . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . 1 . . .     . . . . . . . .     . . . . . . . . . . . 1 . . 1 .     . . . . . . . .     . . . . . . . . . . 1 . . . . 1     . . 1 . . . . .     . . . . . . . 1 . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . code  =Not Defending Defended= Defended pawns not defending other pawns are likely the peak of a chain.

code not defending      not defending white pawns        defended            defended from west          from east . . . . . . . .    . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . 1 . . .     . . . . 1 . . .     . . . . . . . . . . . 1 . . 1 .     . . . . . . . .     . . . . . . 1 . . . 1 . . . . 1     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . . . . . . . . .     . . . . . . . .     . . . . . . . . code

=Forum Posts=
 * [|pattern coding in bitboards] by Pawel Koziol, CCC, February 26, 2015 » Pawn chain

=What links here?= include page="Defended Pawns (Bitboards)" component="backlinks" limit="10"
 * Up one Level**