chess:programming:polyglot_book_format:move
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:
Promoted Piece | Value |
---|---|
None | 0 |
Knight | 1 |
Bishop | 2 |
Rook | 3 |
Queen | 4 |
Castling Moves
Castling moves are represented unconventionally as follows:
Color | Castle Side | Polygot Move |
---|---|---|
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.
- For example, verify that there is really a king present on e1/e8.
chess/programming/polyglot_book_format/move.txt · Last modified: 2022/01/11 14:08 by peter