chess:programming:polyglot_book_format:move
This is an old revision of the document!
Table of Contents
Chess - Programming - Polyglot Book Format - Move
A Move is encoded as a bit field:
Bits | Description |
---|---|
0,1,2 | The destination file. |
3,4,5 | The destination rank. |
6,7,8 | The source file. |
9,10,11 | The source rank. |
12,13,14 | Promotion piece. |
NOTE: Bit 0 is the least significant bit.
Promotion Moves
A Promoted Piece is encoded as follows:
None | 0 |
Knight | 1 |
Bishop | 2 |
Rook | 3 |
Queen | 4 |
Castling Moves
Castling moves are represented unconventionally as follows:
White | King-side Castle | e1h1 |
White | Queen-side Castle | e1a1 |
Black | King-side Castle | e8h8 |
Black | Queen-side Castle | e8a8 |
NOTE: It is technically possible that these moves are legal non-castling moves.
- Therefore a program should verify that a Castle-move was actually valid.
chess/programming/polyglot_book_format/move.1641824402.txt.gz · Last modified: 2022/01/10 14:20 by peter