Changes

Jump to: navigation, search

Defended Pawns (Bitboards)

6,463 bytes added, 10:14, 10 May 2018
Created page with "'''Home * Board Representation * Bitboards * Pawn Pattern and Properties * Defended Pawns''' Each pawn, member of the own Pawn Attacks (Bitboards)..."
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Defended Pawns'''

Each pawn, member of the own [[Pawn Attacks (Bitboards)|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 Pawns (Bitboards)|open]], opponent rooks on [[Pawns and Files (Bitboards)#HalfopenFiles|half-open]] files bang one's head against a brick wall.

''Working in the bitboard centric world to determine pawn related pattern set-wise''.
<span id="Defended"></span>
=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
<pre>
white pawns defended defended
from west -> from east <-
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . 1 . . . . . . . 1 . . . . . . . . . . .
. . . 1 . . 1 . . . . 1 . . . . . . . . . . 1 .
. . 1 . . . . 1 . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
</pre>

<pre>
U64 wPawnDefendedFromWest(U64 wpawns) {
return wpawns & wPawnEastAttacks(wpawns);
}

U64 wPawnDefendedFromEast(U64 wpawns) {
return wpawns & wPawnWestAttacks(wpawns);
}
</pre>

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

<pre>
U64 wPawnDefendersFromWest(U64 wpawns) {
return wpawns & bPawnWestAttacks(wpawns);
}

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

<span id="DefendedDefenders"></span>
=Defended Defenders=
Defended defenders already are the inner pawns of a at least [[Pawn chain|triple-chain]], the d5 pawn for instance:
<pre>
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 . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
</pre>

<span id="NotDefendedDefenders"></span>
=Not Defended Defenders=
Not defended defenders are the base of a [[Pawn chain|chain]] - target of opponent attacks:
<pre>
not defended not defended
white pawns defenders defenders
from west from east
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . 1 . . . . . . . . . . . . . . . . . . .
. . . 1 . . 1 . . . . . . . . . . . . . . . . .
. . 1 . . . . 1 . . 1 . . . . . . . . . . . . 1
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
</pre>
<span id="NotDefendingDefended"></span>
=Not Defending Defended=
Defended pawns not defending other pawns are likely the peak of a [[Pawn chain|chain]].

<pre>
not defending not defending
white pawns defended defended
from west from east
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . 1 . . . . . . . 1 . . . . . . . . . . .
. . . 1 . . 1 . . . . . . . . . . . . . . . 1 .
. . 1 . . . . 1 . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
</pre>

=Forum Posts=
* [http://www.talkchess.com/forum/viewtopic.php?t=55477 pattern coding in bitboards] by [[Pawel Koziol]], [[CCC]], February 26, 2015 » [[Pawn chain]]

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

Navigation menu