Changes

Jump to: navigation, search

Unfree Pawns (Bitboards)

2,563 bytes added, 12:16, 10 May 2018
Created page with "'''Home * Board Representation * Bitboards * Pawn Pattern and Properties * Unfree Pawns''' '''Unfree Pawns''', (Closed Pawns) are pawns with a mec..."
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Unfree Pawns'''

'''Unfree Pawns''', (Closed Pawns)
are pawns with a mechanical obstruction of an opponent pawn in front. Being an unfree pawn is therefore a mutual property for both white and black pawns on a '''closed''' file. Even if weak, like isolated or backward, '''unfree''' pawns are considered less vulnerable than open pawns on a halfopen file. Thus, in the [[Initial Position|initial position]] all pawns are unfree.

=Unfree Single Pawn=
Working in the ''square centric'' world of the board, thus using a square index of '''one''' particular pawn, likely from [[Bitboard Serialization|bitboard traversal]], to lookup pre-calculated pattern.

For a single pawn we need to access a lookup-table to get all squares on the same file in front of the pawn. If the intersection of the frontspan with the set of opponent pawns is not empty, it is an unfree or closed pawn.

<pre>
U64 arrFrontSpans[2][64];

if ( (arrFrontSpans[white][sqOfWhitePawn] & pawnBB[black]) != 0 ) -> pawn unfree
</pre>

<pre>
arrFrontSpan[white][d4]
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .
. . . 1 . . . .
. . . p . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
</pre>

=Unfree Pawns set-wise=
Working in the ''bitboard centric'' world to determine pawn related pattern ''set-wise''.

Unfree (or closed) Pawns have a mechanical obstruction in front - an opponent pawn as member of the own [[Pawn Fills|frontfill]] or [[Pawn Spans|frontspan]]. An intersection with opponents frontspans is sufficient to determine unfree pawns:
<pre>
U64 wUnfreePawns(U64 wpawns, U64 bpawns) {
return wpawns & bFrontSpan(bpawns);
}

U64 bUnfreePawns(U64 bpawns, U64 wpawns) {
return bpawns & wFrontSpan(wpawns);
}
</pre>
=External Links=
* [https://www.chess.com/forum/view/chess-equipment/pawn-power-in-chess-by-hans-kmoch-glossary-of-terms Pawn Power in Chess by Hans Kmoch - Glossary of Terms - Chess Forums] - [https://en.wikipedia.org/wiki/Chess.com Chess.com] <ref>[[Hans Kmoch]] ('''1959, 1990'''). ''Pawn Power in Chess''. New York: Dover, 1990. Previous ed.: New York: McKay, 1959. ISBN 0-486-26486-6</ref>
* [http://www.justchess.biz/chesspawns.htm The Game of Chess: Pawns and Their Related Terms] from [http://www.justchess.biz/ Just Chess .biz]

=See also=
* [[Open Pawns (Bitboards)|Open Pawns]]
* [[Passed Pawns (Bitboards)|Passed Pawns]]
* [[Candidates (Bitboards)|Candidates]]

=References=
<references/>

'''[[Pawn Pattern and Properties|Up one Level]]'''

Navigation menu