Changes

Jump to: navigation, search

Bitboards

791 bytes added, 18:37, 12 March 2022
no edit summary
'''Bitboards''',<br/>
also called bitsets or bitmaps, or better '''Square Sets''', are among other things used to represent the [[Chessboard|board]] inside a chess program in a '''piece centric''' manner. Bitboards, are in essence, [https://en.wikipedia.org/wiki/Finite_set finite sets] of up to [https://en.wikipedia.org/wiki/64_%28number%29 64] [https://en.wikipedia.org/wiki/Element_%28mathematics%29 elements] - all the [[Squares|squares]] of a [[Chessboard|chessboard]], one [[Bit|bit]] per square. Other board [[Games|games]] with greater board sizes may be use set-wise representations as well <ref>[[Reijer Grimbergen]] ('''2007'''). ''Using Bitboards for Move Generation in Shogi''. [[ICGA Journal#30_1|ICGA Journal, Vol. 30, No. 1]], [http://www2.teu.ac.jp/gamelab/RESEARCH/ICGAJournal2007.pdf pdf]</ref>, but classical chess has the advantage that one [[Quad Word|64-bit word]] or register covers the whole board. Even more bitboard friendly is [[Checkers]] with 32-bit bitboards and less [[Pieces#PieceTypeCoding|piece-types]] than chess <ref>[http://www.3dkingdoms.com/checkers/bitboards.htm Checker Bitboards Tutorial] by [[Jonathan Kreuzer]]</ref> <ref>[http://www.talkchess.com/forum/viewtopic.php?t=64487 Checkers Bitboard representation] by Pranav Deshpande, [[CCC]], July 02, 2017</ref>.
=The Board of Sets=
==General Bitboard Techniques==
The fundamental bitboard basics.
* [[General Setwise Operations]]: operations, functions to manipulate bitboards such as set, clear bits in specific indexes, compare them...* [[Population Count]]: count all bit 1s, answer some questions such as how many pieces the Black side has* [[BitScan]]: find index of a bit 1 (usually the most left or most right), answer questions such as where a Rook is or where the targets of a given Knight. Those functions are called in high frequency when generating moves and evaluating
* [[Flipping Mirroring and Rotating]]
* [[Fill Algorithms]]
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76083 Bitboard board representation] by [[Elias Nilsson]], [[CCC]], December 17, 2020
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76548 Thought bitboards was faster :-)] by [[Daniel Anulliero]], [[CCC]], February 10, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=76690 Are Bitboards More Intoxicating Than They Are Good?] by [[Michael Sherwin|Mike Sherwin]], [[CCC]], February 24, 2021
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=77299 Best bitboard design?] by [[Martin Bryant]], [[CCC]], May 13, 2021
* [https://www.talkchess.com/forum3/viewtopic.php?t=78160 The cost of check & discovered check in bitboards] by Bill Beame, [[CCC]], September 13, 2021
* [https://www.talkchess.com/forum3/viewtopic.php?f=7&t=78680 Bitboards ?: C# vs C++] by Bill Beame, [[CCC]], November 17, 2021 » [[C sharp|C#]], [[Cpp|C++]]
* [https://www.talkchess.com/forum3/viewtopic.php?f=7&t=79365 Move generation for bitboards] by [[Elias Nilsson]], [[CCC]], February 16, 2022
=Viewer & Calculator=
=External Links=
==Descriptions==* [httphttps://en.wikipedia.org/wiki/Bitboard Bitboards from Wikipedia]* [httphttps://en.wikipedia.org/wiki/Bit_array Bit-Array from Wikipedia]* [httphttps://en.wikipedia.org/wiki/Bitboard#History Bitboard-History from Wikipedia]* [httphttps://www.craftychess.com/hyatt/boardrep.html Chess board representations] by [[Robert Hyatt]]* [https://web.archive.org/web/20081007034904/http://webpages.charter.net/tlikens/bitmaps/bit_intro.html Bitboards (aka bitmaps)] by [[Tom Likens]]([https://en.wikipedia.org/wiki/Wayback_Machine Wayback Machine], 2008)
* [http://www.fzibi.com/cchess/bitboards.htm An Introduction to BITBOARDS] by [[Franck Zibi]]
* [https://web.archive.org/web/20050205014648/http://www.onjava.com/pub/a/onjava/2005/02/02/bitsets.html Bitwise Optimization in Java: Bitfields, Bitboards, and Beyond] by [[Glen Pepicelli]], ([https://en.wikipedia.org/wiki/Wayback_Machine Wayback Machine], 2005), [http://en.wikipedia.org/wiki/O%27Reilly_Media O'Reilly's] [https://web.archive.org/web/20050203015229/http://onjava.com/ OnJava.com] » [[Java]], [[Bit-Twiddling]]* [httphttps://pages.cs.wisc.edu/~psilord/blog/data/chess-pages/index.html Chess and Bitboards] by [httphttps://pages.cs.wisc.edu/~psilord/ Peter Keller]* [httphttps://sanherlabraj.de/indexferi.htm?lang=eng&url=bitfuncs Bit functions for Delphi] by [[Andreas Herrmann]] » [[Delphi]]* [http://labraj.uni-mbum.si/en/Position_Representation Position Representation - Computer Architecture and Languages Laboratory], [[University of Maribor]]* [httphttps://stackoverflow.com/questions/tagged/bitboard Newest 'bitboard' Questions] - [http://en.wikipedia.org/wiki/Stack_Overflow Stack Overflow]==Libraries==* [https://github.com/sinandredemption/M42 GitHub - sinandredemption/M42: C++ Library for Bitboard Attack Mask Generation] by [[Syed Fahad]]* [https://github.com/kz04px/libchess GitHub - kz04px/libchess: C++ chess library]==Misc==
* [https://www.halloherne.de/artikel/1-september-setunion-in-den-flottmann-hallen-38570.htm?k=tick Setunion] - [https://inherne.net/weltspitze-des-vibraphon-jazz/ Malletmania], [[:Category:Flottmann|Flottmann-Hallen]] <ref>[[:Category:Flottmann|Flottmann-Hallen]] in [https://en.wikipedia.org/wiki/Herne,_North_Rhine-Westphalia Herne], [https://en.wikipedia.org/wiki/North_Rhine-Westphalia North Rhine-Westphalia], [https://en.wikipedia.org/wiki/Germany Germany], part of [[:Category:Industrial Heritage Trail|The Industrial Heritage Trail]] of the [https://en.wikipedia.org/wiki/Ruhr Ruhr area]</ref>, March 10, 2019, [https://en.wikipedia.org/wiki/YouTube YouTube] Video
: [http://www.saxophonquartett-quattro-venti.de/#about Kerstin Fabry], [https://www.lokalkompass.de/tag/christian-ribbe Christian Ribbe], [https://www.folkwang-uni.de/home/theater/studiengaenge/physical-theatre/lehrende/detail-lehrende/personen-detail/elmar-dissinger/ Elmar Dissinger], [https://de.wikipedia.org/wiki/Pee_Wee_Bluesgang Martin Siehoff], [https://www.halloherne.de/artikel/carlotta-ribbe-und-setunion-31511.htm Carlotta Ribbe], [http://guitartist-quartett.com/quartett_ludger.htm Ludger Bollinger]

Navigation menu