Difference between revisions of "Occupancy"

From Chessprogramming wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
'''[[Main Page|Home]] * [[Chess]] * [[Squares]] * Occupancy'''
 
'''[[Main Page|Home]] * [[Chess]] * [[Squares]] * Occupancy'''
  
[[FILE:ZappaBesetzt20160916.JPG|border|right|thumb|Occupied <ref>[https://de-de.facebook.com/umspannwerk.recklinghausen/posts/10153757793891429 Besetzt!] (Occupied) - [https://en.wikipedia.org/wiki/Toilet Toilet] exhibition at [https://de.wikipedia.org/wiki/Umspannwerk_Recklinghausen Umspannwerk Recklinghausen], today [https://en.wikipedia.org/wiki/RWE RWE]  [https://en.wikipedia.org/wiki/Technology_museum Technology museum] in [https://en.wikipedia.org/wiki/Recklinghausen Recklinghausen], Germany, and part of [[:Category:Industrial Heritag Trail|The Industrial Heritage Trail]] of the [https://en.wikipedia.org/wiki/Ruhr Ruhr area] -  [https://en.wikipedia.org/wiki/Toilet#Others Portable toilet] labeled Rock:Klo with [[Videos#FrankZappa|Frank Zappa]] [http://wiki.killuglyradio.com/wiki/The_Toilet_Poster Toilet Poster] inside, Photo by [[Gerd Isenberg]], September 16, 2016</ref> ]]  
+
[[FILE:ZappaBesetzt20160916.JPG|border|right|thumb|Occupied <ref>[https://de-de.facebook.com/umspannwerk.recklinghausen/posts/10153757793891429 Besetzt!] (Occupied) - [https://en.wikipedia.org/wiki/Toilet Toilet] exhibition at [https://de.wikipedia.org/wiki/Umspannwerk_Recklinghausen Umspannwerk Recklinghausen], today [https://en.wikipedia.org/wiki/RWE RWE]  [https://en.wikipedia.org/wiki/Technology_museum Technology museum] in [https://en.wikipedia.org/wiki/Recklinghausen Recklinghausen], Germany, and part of [[:Category:Industrial Heritage Trail|The Industrial Heritage Trail]] of the [https://en.wikipedia.org/wiki/Ruhr Ruhr area] -  [https://en.wikipedia.org/wiki/Toilet#Others Portable toilet] labeled Rock:Klo with [[:Category:Frank Zappa|Frank Zappa]] [http://wiki.killuglyradio.com/wiki/The_Toilet_Poster Toilet Poster] inside, Photo by [[Gerd Isenberg]], September 16, 2016</ref> ]]  
 
   
 
   
 
The '''Occupancy''' refers to the boolean property of a square. It is occupied if any [[Pieces|piece]] exclusively resides on that square, otherwise the square is empty. In [[Bitboards|bitboards]], the occupancy or ''occupied bitboard'' refers the set of all squares occupied by any piece. Thus, it is the [[General Setwise Operations#Union|union]] of all [[Bitboard Board-Definition|piece bitboards]], which is used for instance in calculating [[Sliding Piece Attacks|sliding piece attacks]]. Likely, while the piece bitboards are [[Incremental Updates|updated incrementally]], the occupancy is updated incrementally as well, rather than calculated from up to 12 piece bitboards each time.
 
The '''Occupancy''' refers to the boolean property of a square. It is occupied if any [[Pieces|piece]] exclusively resides on that square, otherwise the square is empty. In [[Bitboards|bitboards]], the occupancy or ''occupied bitboard'' refers the set of all squares occupied by any piece. Thus, it is the [[General Setwise Operations#Union|union]] of all [[Bitboard Board-Definition|piece bitboards]], which is used for instance in calculating [[Sliding Piece Attacks|sliding piece attacks]]. Likely, while the piece bitboards are [[Incremental Updates|updated incrementally]], the occupancy is updated incrementally as well, rather than calculated from up to 12 piece bitboards each time.
Line 25: Line 25:
  
 
'''[[Squares|Up one Level]]'''
 
'''[[Squares|Up one Level]]'''
[[Category:Industrial Heritag Trail]]
+
[[Category:Industrial Heritage Trail]]
 +
[[Category:Frank Zappa]]

Latest revision as of 13:58, 29 June 2018

Home * Chess * Squares * Occupancy

Occupied [1]

The Occupancy refers to the boolean property of a square. It is occupied if any piece exclusively resides on that square, otherwise the square is empty. In bitboards, the occupancy or occupied bitboard refers the set of all squares occupied by any piece. Thus, it is the union of all piece bitboards, which is used for instance in calculating sliding piece attacks. Likely, while the piece bitboards are updated incrementally, the occupancy is updated incrementally as well, rather than calculated from up to 12 piece bitboards each time.

Alternatively, if needed more often, the complement set of the occupancy, the set of all empty squares is exclusively kept inside the board-definition and a cheap not-instruction is done to calculate the occupancy on the fly. Other programs keep disjoint white and black pieces, to "or" them if the occupancy is actually needed. The appearance of multiple, redundant occupied bitboards, which are flipped, mirrored or rotated are eponym of bitboard methods related to sliding piece attack generation, most notably rotated and reverse bitboards.

See also

Obstruction Difference
Occupancy of any Line
Reverse Bitboards
Rotated Bitboards

Forum Posts

External Links

References

  1. Besetzt! (Occupied) - Toilet exhibition at Umspannwerk Recklinghausen, today RWE Technology museum in Recklinghausen, Germany, and part of The Industrial Heritage Trail of the Ruhr area - Portable toilet labeled Rock:Klo with Frank Zappa Toilet Poster inside, Photo by Gerd Isenberg, September 16, 2016

Up one Level