-
Notifications
You must be signed in to change notification settings - Fork 25
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
Halfmove count wraps at 63 #75
Comments
Thank you for reporting. I will take a look it after NNUE is integrated into the official Stockfish branch. |
The bug is here: https://github.com/nodchip/Stockfish/blob/master/src/extra/sfen_packer.cpp#L198 It's written as 6 bits, but the count is in halfmoves so it can go up to 100. To keep data files compatible it will probably have to be clamped. |
Okay, I'm looking at this now and trying to find a way to fix this without breaking backwards compatibility. It looks like it can be fixed by adding one more bit to the bit stream at the end. This would be completely backwards compatibile. |
To reproduce import fens using "learn convert_bin" then rename the output file and reverse with "learn convert_plain" Check the output file. Look at fens that had a halfmove count greater than 63. 64 becomes 0, 65 becomes 1, etc.
Looks like an overflow.
Adding this issue to document the behavior.
The text was updated successfully, but these errors were encountered: