Difference between revisions of "Pawn Fills"

From Chessprogramming wiki
Jump to: navigation, search
m
Line 1: Line 1:
 
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Pawn Fills'''
 
'''[[Main Page|Home]] * [[Board Representation]] * [[Bitboards]] * [[Pawn Pattern and Properties]] * Pawn Fills'''
  
[[FILE:SamuelBakUnexpected.jpg|border|right|thumb|link=http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bba|[[Arts#Bak|Samuel Bak]] - Unexpected  <ref>[http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bc4 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> ]]
+
[[FILE:SamuelBakUnexpected.jpg|border|right|thumb|link=http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bba|[[:Category:Samuel Bak|Samuel Bak]] - Unexpected  <ref>[http://chgs.elevator.umn.edu/asset/viewAsset/57f3b6787d58ae5f74bf8ba9#57f3b6d77d58ae5574bf8bc4 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 Fills''' are base of [[Pawn Spans|spans]]. They are used to determine '''closed''', [[Half-open File|half-open]] and [[Open File|open]] files.
 
'''Pawn Fills''' are base of [[Pawn Spans|spans]]. They are used to determine '''closed''', [[Half-open File|half-open]] and [[Open File|open]] files.
 
<span id="FrontandRearFill"></span>
 
<span id="FrontandRearFill"></span>

Revision as of 11:11, 25 June 2018

Home * Board Representation * Bitboards * Pawn Pattern and Properties * Pawn Fills

Samuel Bak - Unexpected [1]

Pawn Fills are base of spans. They are used to determine closed, half-open and open files.

Front- and Rearfill

Frontfills and rearfills are the base of front- and rearspans, which require one additional north/south shift. Of course whites front direction is north, while blacks front direction is south - vice versa for the rear side.

white frontfill     black rearfill
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 . 1 1 . . . 1
1 1 1 . . 1 1 1     . . . 1 . . . .
1 1 1 . . 1 1 1  ^  . . . . . . . .
. 1 1 . . . 1 1  |   . . . . . . . .
. 1 1 . . . 1 1  |   . . . . . . . .
. . . . . . . .  |   . . . . . . . .
               north
white pawns         black pawns
. . . . . . . .     . . . . . . . .
. . . . . . . .     . 1 . . . 1 1 .
. . . . . . . .     1 . 1 . . . . 1
. . . . . . . .     . . . 1 . . . .
1 . . . . 1 . .     . . . . . . . .
. . 1 . . . . .     . . . . . . . .
. 1 1 . . . 1 1     . . . . . . . .
. . . . . . . .     . . . . . . . .
               south
white rearfill      black frontfill
. . . . . . . .  |  . . . . . . . .
. . . . . . . .  |  . 1 . . . 1 1 .
. . . . . . . .  |  1 1 1 . . 1 1 1
. . . . . . . .  v  1 1 1 1 . 1 1 1
1 . . . . 1 . .     1 1 1 1 . 1 1 1
1 . 1 . . 1 . .     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1

Parallel prefix Kogge-Stone-routines are used to fill either north or south:

U64 nortFill(U64 gen) {
   gen |= (gen <<  8);
   gen |= (gen << 16);
   gen |= (gen << 32);
   return gen;
}

U64 soutFill(U64 gen) {
   gen |= (gen >>  8);
   gen |= (gen >> 16);
   gen |= (gen >> 32);
   return gen;
}

Note that the pawns are still subset of their fill sets. The intersection of both north and south fills leaves the initial pawn set again. All pawns which are member of the opponent front fills have a mechanical obstruction and are unfree.

U64 wFrontFill(U64 wpawns) {return nortFill(wpawns);}
U64 wRearFill (U64 wpawns) {return soutFill(wpawns);}

U64 bFrontFill(U64 bpawns) {return soutFill(bpawns);}
U64 bRearFill (U64 bpawns) {return nortFill(bpawns);}


Filefill

The union of both front- and rearfills, leaves the complete file with at least one either white or black pawn on it. Since filefills have all ranks equal, they may treated as bytes, if it is about pure file sets.

U64 fileFill(U64 gen) {
   return nortFill(gen) | soutFill(gen);
}
white pawns         black pawns
. . . . . . . .     . . . . . . . .
. . . . . . . .     . 1 . . . 1 1 .
. . . . . . . .     1 . 1 . . . . 1
. . . . . . . .     . . . 1 . . . .
1 . . . . 1 . .     . . . . . . . .
. . 1 . . . . .     . . . . . . . .
. 1 1 . . . 1 1     . . . . . . . .
. . . . . . . .     . . . . . . . .
white filefill      black filefill
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1
1 1 1 . . 1 1 1     1 1 1 1 . 1 1 1

Based on pawns, files are either closed, open or halfopen.

See also

External Links

feat. John Scofield and Alphonso Johnson, Montreux Jazz Festival, July 6, 1976
Up one Level