Code is found here.
I'm having trouble constructing a magic bitboard lookup table as per this example and the magicmoves.c file that I translated to Python.
Quick download to this and the
.hfile are here (link taken from the website above for QOL)
As per stats I take after the lookup table is filled in, I get these results: ```yml
Bishop table:
Filled spaces: 5248
Empty spaces: 27520
Total spaces: 32768
Rook table:
Filled spaces: 32768
Empty spaces: 229376
Total spaces: 262144
I would expect to have both tables filled up, yet only 16% of the bishop table is filled and only 12.5% of the rook table is filled. Why would this be?
Is it how I constructed my arrays by first filling them with zeroes and then replacing them with other values? I tried to implement how I'd think C would manage creating and editing arrays but I have never dug that deep into C and don't plan on it any time soon. Source code took quite a while to translate too.
> Previous post: https://discord.com/channels/@me/1244078667999477922/1274205519770292234