Re:How to Store a Chess Game in 26 Bytes Using Bit-Level Mag...
by ThomasCM on Friday September 15, 2023 @04:11PM
(#37528546)
Yes, ignoring compression each (half-)move takes up one byte. So if you want to store a sequence of 10 (half-)moves it would take only 10 bytes.
[ Parent
| on HN ]
Re:How to Store a Chess Game in 26 Bytes Using Bit-Level Mag...
by SideQuark on Friday September 15, 2023 @05:13PM
(#37529198)
Average game length seems to be around 80 half moves though.
https://chess.stackexchange.com/questions/2506/what-is-the-a...
I'd expect that ordering moves by popularity at each half move index, using say the above dataset, would allow you to select lower indexed values at each step, allowing a nice context based arithmetic compression to really shrink them well.
Re:How to Store a Chess Game in 26 Bytes Using Bit-Level Mag...
by ThomasCM on Friday September 15, 2023 @05:30PM
(#37529364)
Yes, in contrast to storing the board (which can be a fixed size), this depends on the length of the game of course.
That said, there are some optimizations you can apply that will compress moves even further (for example the order of the moves as explained in the Lichess blog post is important). In the end it's a tradeoff between (de)serializing the game fast and reducing the size (even more).