Closed KarlKfoury closed 2 weeks ago
There was also https://github.com/LeelaChessZero/lc0/pull/445, we should finally check what is right. :)
BoardSquare.as_int() row*8 + col to pack square name into an int which is the horizontal indexing notation (a1 = 0, b1 = 1...). And all subsequent methods and functions (Move::as_packed_int for example) seem to follow this standard
The comment on the bitboard function previously stated that "a8 is bit 7, b1 is bit 8". All bitboard methods (set, get, reset...) use the following to set the position of the bit on the bitboard: std::uint64_t(1) << pos, with pos being the BoardSquare index that follows the horizontal indexing notation (a1=0, b1=1, c1=2...) Meaning the bit's position on the bitboard is going to be 0 + pos which means the position of the bit should also follow the horizontal indexing notation.