19 ms·
If you actually want good compression, this is definitely not the proper way to go. The proper way to go is to compute all available moves on a given position,
by devit 3y ago
If you actually want good compression, this is definitely not the proper way to go.
The proper way to go is to compute all available moves on a given position, assign them a probability distribution and then perform arithmetic coding using it.
If you want simplicity, assign an uniform distribution. For optimal compression, use an engine such as Stockfish to evaluate how strong the moves are, and then apply a statistical model that converts move strength to weights to make a probability distribution for; also use an opening books for the openings and tablebases for the endgames.
My wild guess is that it will probably result in something like 3-4 bits per move on average.
If you instead want a simple encoding, then encode in 4 bits the piece that moved based on any order on the chessboard squares, then in 6 bits the destination square for 10 bits per move.
- deleted 3y ago[deleted]