3 ms·
Couldn't you make it practical by assuming all possible positions (64) for the first piece, then 63 for the second, and so on, and encode one piece at a time? (
by Scene_Cast2 3y ago
Couldn't you make it practical by assuming all possible positions (64) for the first piece, then 63 for the second, and so on, and encode one piece at a time? (Arithmetic coding piece by piece)
- HALtheWise 3y agoYes, although 1. You'd definitely want to deduplicate positions of identical pieces for even more savings 2. That only handles the case where no pieces have been captured, and the full arithmetic coding would probably need separate "sections" of the integer range for different cases, and the number of sections is also quite high. 3. There's extra nuanced things you might want to handle in the coding, like that pawns can't be on their own back row. That is significantly harder. It looks to me like https://github.com/tromp/ChessPositionRanking https://github.com/tromp/ChessPositionRanking has resolved these sorts of issues, but I haven't dug into exactly how.