Changes

Jump to: navigation, search

Pawn Islands (Bitboards)

5,118 bytes added, 11:44, 10 May 2018
Created page with "'''Home * Board Representation * Bitboards * Pawn Pattern and Properties * Pawn Islands''' FILE:Drowned.jpg|border|right|thumb|link=http://chgs.el..."
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Pawn Islands'''

[[FILE:Drowned.jpg|border|right|thumb|link=http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bbd|[[Arts#Bak|Samuel Bak]] - Drowned <ref>[http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bbd Chess in the Art of Samuel Bak], [http://www.chgs.umn.edu/ Center for Holocaust & Genocide Studies], [https://en.wikipedia.org/wiki/University_of_Minnesota University of Minnesota]</ref> ]]

'''Pawn Islands''' of either side are groups of pawns (at least one), separated by files without own pawns. Those files are therefore either [[Pawns and Files (Bitboards)#HalfopenFiles|halfopen]] or [[Pawns and Files (Bitboards)#OpenFiles|open]]. All other things being equal, the side with fewer pawn islands has an advantage, because the individual pawns are easier to defend against enemy attacks. Each island has a west- or east border file. Rook-files may be the most outer borders.

=Sample Filesets=
Black has three islands here, white two:
<pre>
. . . . . . . .
b . . . . . . b
. b . b b . b .
. . . . . . . .
. . . . . . . .
. w . . . w . .
w . w . . . w w
. . . . . . . .
</pre>
Those are the black and white [[Pawns and Files (Bitboards)#Fileset|filesets]], one byte each.
<pre>
b b . b b . b b

w w w . . w w w
</pre>

=Island Borders=
Based on [[Pawns and Files (Bitboards)#Fileset|filesets]], we can simply determine the west- or east border-files of each island. By shifting left or right one, xor with the original fileset to get all the 0-1 or 1-0 transitions - to finally intersect it with the original fileset to restrict the transitions inside this set of occupied files. The result are the files with [[Isolated Pawns (Bitboards)#IsolanisSetWise|half-isolanis]].

Since [[General Setwise Operations#Intersection|conjunction]] is distributive over [[General Setwise Operations#ExclusiveOr|xor]], one may alternately swap both operands. In fact it is the [[General Setwise Operations#XorWithout|relative complement]] of the shifted files in files and takes three operations each.

==East==
<pre>
b b . b b . b b
. b . . b . . b

w w w . . w w w
. . w . . . . w
</pre>

<pre>
BYTE islandsEastFiles(BYTE f) {return f & (f ^ (f >> 1));}
BYTE islandsEastFiles(BYTE f) {return f ^ (f & (f >> 1));}
BYTE islandsEastFiles(BYTE f) {return f & ~(f >> 1) ;}
</pre>

<pre>
1 . . . 1 1 . . files
. . . 1 1 . . . files >> 1 (board left or west)
1 . . 1 . 1 . . xor -> all the west 0-1 or 1-0 file-transitions
1 . . . . 1 . . and files -> east files of each island
</pre>

==West==
<pre>
b b . b b . b b
b . . b . . b .

w w w . . w w w
w . . . . w . .
</pre>

<pre>
BYTE islandsWestFiles(BYTE f) {return f & (f ^ (f << 1));} // ... (f+f)
BYTE islandsWestFiles(BYTE f) {return f ^ (f & (f << 1));}
BYTE islandsWestFiles(BYTE f) {return f & ~(f << 1) ;}
</pre>

<pre>
1 . . . 1 1 . . files
. 1 . . . 1 1 . files << 1 (board right or east)
1 1 . . 1 . 1 . xor -> all the east 0-1 or 1-0 file-transitions
1 . . . 1 . . . and files -> west files of each island
</pre>

=Number of Islands=
Since each island has exactly one west- and one east border-file, the [[Population Count|population count]] of either border-set might be used to determine the numbers of islands, see [[Dispersion and Distortion|dispersion]]. Of course all byte-wise calculations may be implemented by small, preinitialized lookup tables, indexed by fileset (0..255), containing the number of islands, bitboards of isolated files and whatever else. The maximum number of islands is four.

=Isolated Files=
The intersection of east- and west border-files are already files with [[Isolated Pawns (Bitboards)#IsolanisSetWise|isolated pawns]].
<pre>
1 . . . . 1 . . east files of each island
1 . . . 1 . . . west files of each island
1 . . . . . . . and -> isolated files
. . . . 1 1 . . xor -> resets isolated files
</pre>
To isolate wider (2..8) islands is not that hard either.

=External Links=
* [https://en.wikipedia.org/wiki/Glossary_of_chess#P Glossary of chess from Wikipedia - P]
* [[Videos#KingCrimson|King Crimson]] - [https://en.wikipedia.org/wiki/Islands_%28King_Crimson_song%29 Islands], 1971, [https://en.wikipedia.org/wiki/YouTube YouTube] Video
: lineup: [[Videos#RobertFripp|Robert Fripp]], [https://en.wikipedia.org/wiki/Boz_Burrell Boz Burrell], [https://en.wikipedia.org/wiki/Ian_Wallace_%28drummer%29 Ian Wallace], [https://en.wikipedia.org/wiki/Mel_Collins Mel Collins], [https://en.wikipedia.org/wiki/Peter_Sinfield Peter Sinfield] with [[Videos#KeithTippett|Keith Tippett]], [https://en.wikipedia.org/wiki/Mark_Charig Mark Charig], [https://en.wikipedia.org/wiki/Harry_Miller_%28jazz_bassist%29 Harry Miller] and [http://www.sco.org.uk/content/robin-miller-sco-principal-oboe-1976-1989-has-passed-away Robin Miller]
: {{#evu:https://www.youtube.com/watch?v=vBgVTSGNE3I|alignment=left|valignment=top}}

=References=
<references />

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

Navigation menu