7 ms·
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.
by ThomasCM 3y ago
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.
- SideQuark 3y agoAverage game length seems to be around 80 half moves though. https://chess.stackexchange.com/questions/2506/what-is-the-average-length-of-a-game-of-chess 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.
- ThomasCM 3y agoYes, 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).
- chipsrafferty 3y agoIt seems, then, if you wanted to efficiently store lots of positions, it would be smart to store a large list of openings, a large list of following sequences, and then your positions can be stored as a list of sequence ids.