Changes

Jump to: navigation, search

Duo Trio Quart (Bitboards)

5,109 bytes added, 10:16, 10 May 2018
Created page with "'''Home * Board Representation * Bitboards * Pawn Pattern and Properties * Duo Trio Quart''' '''Pawn-Duo''', (Phalanx) <ref>[http://www.chess-game-s..."
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Duo Trio Quart'''

'''Pawn-Duo''', (Phalanx) <ref>[http://www.chess-game-strategies.com/pawn-structure_general_page-5_phalanx-formation.html Pawn Structure (General) | Page 5 of 5 | Phalanx Formation]</ref> <br/>
two adjacent [[Pawn|pawns]] of the same [[Color|color]] on the same [[Ranks|rank]] that mutually cover the other's [[Stop Square|stop square]]. A '''Trio''' are three horizontal friendly pawns, a '''Quart''' four horizontal friendly pawns.

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

''The code snippets rely on [[General Setwise Operations#ShiftingBitboards|shifting bitboards]], specially by [[General Setwise Operations#OneStepOnly|one step only]].''

=Neighbors=
To get pawns with east or west neighbors is simple:
<pre>
U64 pawnsWithEastNeighbors(U64 pawns) {
return pawns & westOne (pawns);
}

U64 pawnsWithWestNeighbors(U64 pawns) {
return pawnsWithEastNeighbors(pawns) << 1; // * 2
}
</pre>
or
<pre>
U64 pawnsWithWestNeighbors(U64 pawns) {
return pawns & eastOne (pawns);
}

U64 pawnsWithEastNeighbors(U64 pawns) {
return pawnsWithWestNeighbors(pawns) >> 1;
}
</pre>

<pre>
pawns pawns with east pawns with west pawns with east
neighbors neighbors and west neighbors
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 1 1 . . . . . 1 1 . . . . . . . 1 1 . . . . . . 1 . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 1 1 . . . . . . 1 . . . . . . . . 1 . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
</pre>
=Neighbor Algebra=
Pawns with east or west neighbors are at least member of a duo. Pawns with east and west neighbors at least member of a trio. If two neighbors have both east and west neighbors, it is at least a quart.

An exclusive pawn duo is therefor a pawn with one neighbor, while this neighbor has no other neighbor as well.
<pre>
U64 duo (U64 pawns) {
U64 withWestNeighbors = pawnsWithWestNeighbors(pawns);
U64 withEastNeighbors = withWestNeighbors >> 1;

U64 withOneExclusiveNeighbor = withWestNeighbors ^ withEastNeighbors;
U64 withExclusiveWestNeighbor = withWestNeighbors & withOneExclusiveNeighbor;
U64 withExclusiveEastNeighbor = withEastNeighbors & withOneExclusiveNeighbor;

U64 duoWestOne = withEclusiveEastNeighbor & (withEclusiveWestNeighbor >> 1);
U64 duoEastOne = duoWestOne << 1;
return duoWestOne | duoEastOne;
}
</pre>

<pre>
pawns pawns with excl. pawns with excl. duo
east neighbor west neighbor
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 1 1 . . . . . 1 . . . . . . . . . 1 . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 1 1 . . . . . . 1 . . . . . . . . 1 . . . . . . 1 1 .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
</pre>
=See also=
* [[Stop Square]]
* [[Hanging Pawns]]
* [[Pawn Islands (Bitboards)]]
* [[Phalanx]] (Engine)

=Forum Posts=
* [http://www.talkchess.com/forum/viewtopic.php?t=52382 The phalanx concept] by [[Lyudmil Tsvetkov]], [[CCC]], May 21, 2014

=External Links=
* [http://www.chess-game-strategies.com/pawn-structure_general_page-5_phalanx-formation.html Pawn Structure (General) | Page 5 of 5 | Phalanx Formation]
* [https://en.wikipedia.org/wiki/Duet Duet from Wikipedia]
* [https://en.wikipedia.org/wiki/Phalanx Phalanx from Wikipedia]
* [https://en.wikipedia.org/wiki/Trio Trio from Wikipedia]
* [http://kingaglyk.pl Kinga Głyk Trio] - Walking Baby, [http://www.visioninmusica.com/ VisionInMusica], [https://en.wikipedia.org/wiki/Terni Terni], March 10, 2017, [https://en.wikipedia.org/wiki/YouTube YouTube] Video
: [[Videos#KingaGlyk|Kinga Głyk]], [http://glyk.pl/ Irek Głyk], [http://www.visioninmusica.com/kinga-glyk-happy-birthday/ Rafal Stepien]
: {{#evu:https://www.youtube.com/watch?v=Xmq52kc_HM0|alignment=left|valignment=top}}
* [https://en.wikipedia.org/wiki/Quart_%28disambiguation%29 Quart (disambiguation) from Wikipedia]
* [[Videos#PantaRhei|Panta Rhei]] plays [https://en.wikipedia.org/wiki/B%C3%A9la_Bart%C3%B3k Bartók's] Quarts, 1977, [https://en.wikipedia.org/wiki/YouTube YouTube] Video
: {{#evu:https://www.youtube.com/watch?v=xDiKq9Wf0UQ|alignment=left|valignment=top}}

=References=
<references />

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

Navigation menu