Passed+Pawns+(Bitboards)

toc  =Single Passer= Working in the **square centric** world of the board, thus using a square index of **one** particular pawn, likely from bitboard traversal, to lookup pre-calculated pattern.
 * Home * Board Representation * Bitboards * Pawn Pattern and Properties * Passed Pawns**
 * [[image:Pawn's_Dream.jpg width="262" height="262" link="http://www.carinajorgensen.com/Chess/pawnsdream.php"]] ||~  || A **passed pawn**, also called **passer**, has no opponent pawns in front on the same or adjacent files. In Bitboards, passers may be determined square- or set-wise.  ||
 * Carina Jørgensen, Pawn's Dream ||~  ||^   ||

For a single pawn we need to access a lookup-table to get all squares on the same file and adjacent file in front of the pawn. This is what we call front-span and attack spans. If the intersection of those span-union with the set of opponent pawns is empty, it is a passed pawn. code format="cpp" U64 arrFrontSpans[2][64];

if ( (arrFrontSpans[white][sqOfWhitePawn] & pawnBB[black]) == 0 ) -> pawn is a passer code

code arrFrontSpans[white][d4] . . 1 1 1 . . . . . 1 1 1 . . . . . 1 1 1 . . . . . 1 1 1 . . . . . . p. . . . . . . . . . . . . . . . . . . . . . . . . . . . code Pawns ready to promote don't need above condition, the appearance on the 7th (or 2nd) rank is already sufficient to be a passer: code format="cpp" if ( sqOfWhitePawn >= a7 ) -> white pawn may promote if ( sqOfBlackPawn <= h2 ) -> black pawn may promote code

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

Passers are the pawns outside the union of all opponent frontspans and attack-frontspans.

code format="cpp" U64 wPassedPawns(U64 wpawns, U64 bpawns) { U64 allFrontSpans = bFrontSpans(bpawns); allFrontSpans |= eastOne(allFrontSpans) | westOne(allFrontSpans); return wpawns & ~allFrontSpans; }

U64 bPassedPawns(U64 bpawns, U64 wpawns) { U64 allFrontSpans = wFrontSpans(wpawns); allFrontSpans |= eastOne(allFrontSpans) | westOne(allFrontSpans); return bpawns & ~allFrontSpans; } code

=See also=
 * Candidate Passed Pawn
 * Candidates (Bitboards)
 * Hidden Passed Pawn
 * Passed Pawn
 * Passed Pawn Extensions
 * Set-wise Rule of Squares

=External Links=
 * [|Passed pawn from Wikipedia]

=References= =What links here?= include page="Passed Pawns (Bitboards)" component="backlinks" limit="20"
 * Up one Level**