chess:programming:polyglot_book_format:piece
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
chess:programming:polyglot_book_format:piece [2022/01/10 14:50] – peter | chess:programming:polyglot_book_format:piece [2022/01/11 13:55] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Chess - Programming - Polyglot Book Format - Piece ====== | ====== Chess - Programming - Polyglot Book Format - Piece ====== | ||
- | See [[Chess: | + | **Piece** is part of the [[Chess: |
- | **Piece** | + | It is the exclusive or of entries from the **RANDOM_PIECE** sub-array, one for each piece on the board. |
- | The offset of the entry in RandomPiece | + | The offset of the entry in **RANDOM_PIECE** |
- | + | piece = 64 * Piece_Type | |
- | < | + | |
- | offset_piece=64*kind_of_piece+8*row+file; | + | |
</ | </ | ||
- | " | + | ---- |
- | ^Square^File^Rank^ | + | **Piece_Type** |
- | |a1|0|0| | + | |
- | |h1|7|0| | + | |
- | |a8|0|7| | + | |
- | |h8|7|7| | + | |
- | + | ||
- | + | ||
- | " | + | |
- | + | ||
- | |black pawn 0 | + | |
- | |white pawn 1 | + | |
- | |black knight | + | |
- | |white knight | + | |
- | |black bishop | + | |
- | |white bishop | + | |
- | |black rook 6 | + | |
- | |white rook 7 | + | |
- | |black queen 8 | + | |
- | |white queen 9 | + | |
- | |black king 10 | + | |
- | |white king 11 | + | |
<code cpp> | <code cpp> | ||
Line 51: | Line 29: | ||
</ | </ | ||
+ | ---- | ||
+ | |||
+ | **Rank** and **File** are counted from 0 to 7: | ||
+ | |||
+ | ^Square^File^Rank^ | ||
+ | |a1|0|0| | ||
+ | |h1|7|0| | ||
+ | |a8|0|7| | ||
+ | |h8|7|7| | ||
+ | |||
+ | ---- | ||
[[Chess: | [[Chess: |
chess/programming/polyglot_book_format/piece.1641826215.txt.gz · Last modified: 2022/01/10 14:50 by peter