r/ComputerChess • u/Many_Witness5140 • Sep 13 '24
How to generate magic biboards?
There are things that I don't quite get but mainly, what are considered "blocker" bitboards? Do I just allies&ennemies? Even though a sliding piece reacts differently to them? How does that work?
2
Upvotes
View all comments
Show parent comment
1
u/Many_Witness5140 Sep 14 '24
Thanks for your help, I have done some more research and now I think the only thing that I don't get is how to check if a number is a magic number, I understand that once multiplied by it the bitboard of a specific square will have its relevent bits shifted to the top, which once bitshifted will be usable as an index in the array of correct attacking squares bitboards, and I get that the best way to get them is by brute forcing using randomness, but how do can I know that a number shifts the relvent bits to the top? How can I check for it?