Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adressing issue #825 #2054

Merged
merged 2 commits into from
Aug 25, 2024
Merged

adressing issue #825 #2054

merged 2 commits into from
Aug 25, 2024

Conversation

KarlKfoury
Copy link
Contributor

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.

@mooskagh
Copy link
Member

There was also #445, we should finally check what is right. :)

@KarlKfoury
Copy link
Contributor Author

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

@mooskagh mooskagh merged commit 08b41c4 into LeelaChessZero:master Aug 25, 2024
3 checks passed
@borg323 borg323 mentioned this pull request Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants