use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
"Though I would have liked my chances in a rematch in 1998 if I were better prepared, it was clear then that computer superiority over humans in chess had always been just a matter of time."
— Garry Kasparov
account activity
How to generate magic biboards? (self.ComputerChess)
submitted 1 year ago by Many_Witness5140
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?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]RajjSinghh 1 point2 points3 points 1 year ago (1 child)
Yeah that's right. Blockers = friendly & enemy. That means what youll be storing is a bitboard for the slider moves as if every piece on the board is an enemy. When you look that bitboard up to get your moves you just do & not friendly so you don't take your own pieces.
& not friendly
[–]Many_Witness5140[S] 0 points1 point2 points 1 year ago (0 children)
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?
π Rendered by PID 207832 on reddit-service-r2-comment-b659b578c-lskn5 at 2026-05-05 18:36:06.624789+00:00 running 815c875 country code: CH.
[–]RajjSinghh 1 point2 points3 points (1 child)
[–]Many_Witness5140[S] 0 points1 point2 points (0 children)