User Tools

Site Tools


chess:programming:magic_bitboards

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
chess:programming:magic_bitboards [2021/10/27 22:13] peterchess:programming:magic_bitboards [2021/10/30 13:12] (current) peter
Line 2: Line 2:
  
 Magic BitBoards are an efficient way to take a position and obtain the legal moves for a sliding piece.  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.
  
 ---- ----
 +
 +[[Chess:Programming:Magic BitBoards:Calculate Magic Numbers|Calculate Magic Numbers]]
  
 [[Chess:Programming:Magic BitBoards:Magic BitBoard Principle|Magic BitBoard Principle]] [[Chess:Programming:Magic BitBoards:Magic BitBoard Principle|Magic BitBoard Principle]]
  
 +
 +----
 +
 +===== References =====
 +
 +https://stackoverflow.com/questions/7365562/de-bruijn-like-sequence-for-2n-1-how-is-it-constructed
 +
 +https://www.stmintz.com/ccc/index.php?id=306404
  
chess/programming/magic_bitboards.1635372834.txt.gz · Last modified: 2021/10/27 22:13 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki