Closed biscuitderg closed 1 year ago
Hi, I don't have time to look into your code right now unfortunately, but just wanted to mention that I've recently added a function called VisualizeBitboard in the BitboardHelper class which may help with debugging bitboard issues. I've also verified that the GetKnightAttacks and GetPawnAttacks are working as expected.
Thanks, I will check that out and see
@SebLague Ok, I've dug in a bit further. I overlooked my conditionals and I was overwriting the pawn/knight values due to that final if/else. Closing this out, my bad lol
I am trying to evaluate controlled space on the board based on how many squares the bot's pieces are able to attack, but pawns/knights are giving unexpected values when using
BitboardHelper.GetPawnAttacks()
andBitboardHelper.GetKnightAttacks()
Here is what I'm currently running to view attacked squares while attempting to debug:
Even after moving a pawn up to where it could be attacked by a black pawn (thinking maybe there had to be an enemy piece on the square), it is still showing all 0s for pawns. I have ensured that isWhite = False when calling the GetPawnAttacks or GetKnightAttacks methods. Even when
& ~my_pieces
is removed withinGetAttackBitboards()
, knights and pawns are still returning 0 when nonzero values are expected.