User Tools

Site Tools


chess:programming:magic_bitboards

Chess - Programming - Magic BitBoards

Magic BitBoards are an efficient way to take a position and obtain the legal moves for a sliding piece.

The occupancy bits for a specific piece on a specific square can be multiplied against a “magic” number, and then shifted, to obtain an index in a per-initialized attack table.


Calculate Magic Numbers

Magic BitBoard Principle


References

chess/programming/magic_bitboards.txt · Last modified: 2021/10/30 13:12 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki