Changes

Jump to: navigation, search

Isolated Pawns (Bitboards)

2,417 bytes added, 12:08, 10 May 2018
Created page with " '''Home * Board Representation * Bitboards * Pawn Pattern and Properties * Isolated Pawns''' An '''Isolated Pawn''' or '''Isolani''' has no friendl..."

'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Isolated Pawns'''

An '''Isolated Pawn''' or '''Isolani''' has no friendly pawns on adjacent [[Files|files]]. Isolanis may be determined inside the ''square centric world'' as well in ''set-wise world'' of Bitboards considering the whole board.
<span id="IsolaniBySquare"></span>
=Isolani by Square=
To determine whether a pawn is isolated, we simply lookup an [[Array|array]] with neighboring file-masks. If the [[General Setwise Operations#Intersection|intersection]] of neighbored files with own pawns is empty, the pawn is isolated. This symmetrical property appears to be equal for white and black pawns.
<pre>
if ( (arrNeighborFiles[sqOfWhitePawn] & pawnBB[white]) == 0 ) -> pawn is isolated
</pre>

<pre>
arrNeighborFiles[d*]
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
. . 1 . 1 . . .
</pre>
The arrNeighborFiles might be condensed to eight bitboards only, instead of 64 - if we index by
<pre>
file(sq) == sq & 7
</pre>
instead of square.
<span id="IsolanisSetWise"></span>
=Isolanis and Half-isolanis set-wise=
Isolated pawns are the [[General Setwise Operations#RelativeComplement|relative complement]] of pawns with the union of their own [[Attack Spans|attack fills]] over the whole file. To keep disjoint pawns with no neighbor on either east or west adjacent files has the advantage of greater versatility. Isolanis are the intersection of them, half-isolanis the exclusive or:
<pre>
U64 noNeighborOnEastFile (U64 pawns) {
return pawns & ~westAttackFileFill(pawns);
}

U64 noNeighborOnWestFile (U64 pawns) {
return pawns & ~eastAttackFileFill(pawns);
}

U64 isolanis(U64 pawns) {
return noNeighborOnEastFile(pawns)
& noNeighborOnWestFile(pawns);
}

U64 halfIsolanis(U64 pawns) {
return noNeighborOnEastFile(pawns)
^ noNeighborOnWestFile(pawns);
}
</pre>
<span id="HangingPawns"></span>
=Hanging pawns=
[[Hanging pawns]] are a [[Duo Trio Quart (Bitboards)|duo]] of [[Open Pawns (Bitboards)|open]] and half-isolated pawns.
<pre>
U64 wHangingPawns(U64 wpawns, U64 bpawns) {
return wOpenPawns(wpawns, bpawns)
& halfIsolanis(wpawns) & duo(wpawns);
}
</pre>
=See also=
* [[Isolated Pawn]]
* [[Dispersion and Distortion]]
* [[Pawn Islands]]

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

Navigation menu