BishopMask for MagicBitboard Implementation
Posted: Sat Apr 16, 2016 11:43 am
Hi -
I'm working on a chess engine with MagicBitBoard move generator. I have a question about BishopMask. I have seen that for this mask (as well as RookMask), we turn off the bits at the edge of the board. My question is, if we do that, bishops at opposite corners of the board will have the same Mask - for example a bishop at A1 or H8 will have the same Mask (or am I missing something?) - which is going to be a problem. So -
1. Is this expected?
2. Am I doing the BishopMask wrong?
Hope someone who knows this stuff can clarify. Thanks!
Jayakiran
I'm working on a chess engine with MagicBitBoard move generator. I have a question about BishopMask. I have seen that for this mask (as well as RookMask), we turn off the bits at the edge of the board. My question is, if we do that, bishops at opposite corners of the board will have the same Mask - for example a bishop at A1 or H8 will have the same Mask (or am I missing something?) - which is going to be a problem. So -
1. Is this expected?
2. Am I doing the BishopMask wrong?
Hope someone who knows this stuff can clarify. Thanks!
Jayakiran