chess:programming:polyglot_book_format:key
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
chess:programming:polyglot_book_format:key [2022/01/11 13:22] – created peter | chess:programming:polyglot_book_format:key [2022/01/11 14:03] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Chess - Programming - Polyglot Book Format - Key ====== | ====== Chess - Programming - Polyglot Book Format - Key ====== | ||
- | The **Key** is a 64-bit Zorbrist hash of a board position. | + | The **Key** is a 64-bit Zorbrist hash of a board position, together with some additional information: |
< | < | ||
Line 11: | Line 11: | ||
* [[Chess: | * [[Chess: | ||
- | * Castle | + | * [[Chess: |
- | * Enpassant | + | * [[Chess: |
- | * Turn | + | * [[Chess: |
</ | </ | ||
Line 97: | Line 97: | ||
---- | ---- | ||
+ | |||
+ | ==== RANDOM_POLYGOT ==== | ||
+ | |||
+ | This is the master array. | ||
<code cpp> | <code cpp> | ||
Line 302: | Line 306: | ||
---- | ---- | ||
- | The array RANDOM_POLYGOT is in fact a concatenation of four sub-arrays: | + | The array **RANDOM_POLYGOT** is in fact a concatenation of four sub-arrays: |
<code cpp> | <code cpp> | ||
Line 310: | Line 314: | ||
RANDOM_TURN | RANDOM_TURN | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== RANDOM_PIECE ==== | ||
<code cpp> | <code cpp> | ||
Line 507: | Line 515: | ||
| | ||
}; | }; | ||
+ | </ | ||
+ | ==== RANDOM_CASTLE ==== | ||
+ | <code cpp> | ||
constexpr uint64_t RANDOM_CASTLE[4] = | constexpr uint64_t RANDOM_CASTLE[4] = | ||
{ | { | ||
uint64_t(0x31D71DCE64B2C310), | uint64_t(0x31D71DCE64B2C310), | ||
}; | }; | ||
+ | </ | ||
+ | ---- | ||
+ | ==== RANDOM_ENPASSANT ==== | ||
+ | |||
+ | <code cpp> | ||
constexpr uint64_t RANDOM_ENPASSANT[8] = | constexpr uint64_t RANDOM_ENPASSANT[8] = | ||
{ | { | ||
Line 520: | Line 536: | ||
uint64_t(0xCF3145DE0ADD4289), | uint64_t(0xCF3145DE0ADD4289), | ||
}; | }; | ||
+ | </ | ||
+ | ---- | ||
+ | ==== RANDOM_TURN ==== | ||
+ | |||
+ | <code cpp> | ||
constexpr uint64_t RANDOM_TURN = uint64_t(0xF8D626AAAF278509); | constexpr uint64_t RANDOM_TURN = uint64_t(0xF8D626AAAF278509); | ||
</ | </ | ||
chess/programming/polyglot_book_format/key.1641907325.txt.gz · Last modified: 2022/01/11 13:22 by peter