User Tools

Site Tools


chess:programming:polyglot_book_format:key

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
chess:programming:polyglot_book_format:key [2022/01/11 13:22] – created peterchess: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:
  
 <code> <code>
Line 11: Line 11:
  
   * [[Chess:Programming:Polyglot Book Format:Piece|Piece]]   * [[Chess:Programming:Polyglot Book Format:Piece|Piece]]
-  * Castle +  * [[Chess:Programming:Polyglot Book Format:Castle|Castle]] 
-  * Enpassant +  * [[Chess:Programming:Polyglot Book Format:Enpassant|Enpassant]] 
-  * Turn+  * [[Chess:Programming:Polyglot Book Format:Turn|Turn]]
  
 </WRAP> </WRAP>
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      (offset: 780, length:   1) RANDOM_TURN      (offset: 780, length:   1)
 </code> </code>
 +
 +----
 +
 +==== RANDOM_PIECE ====
  
 <code cpp> <code cpp>
Line 507: Line 515:
    uint64_t(0x5FA7867CAF35E149), uint64_t(0x56986E2EF3ED091B), uint64_t(0x917F1DD5F8886C61), uint64_t(0xD20D8C88C8FFE65F)    uint64_t(0x5FA7867CAF35E149), uint64_t(0x56986E2EF3ED091B), uint64_t(0x917F1DD5F8886C61), uint64_t(0xD20D8C88C8FFE65F)
 }; };
 +</code>
  
 +==== RANDOM_CASTLE ====
  
 +<code cpp>
 constexpr uint64_t RANDOM_CASTLE[4] =  constexpr uint64_t RANDOM_CASTLE[4] = 
 { {
   uint64_t(0x31D71DCE64B2C310), uint64_t(0xF165B587DF898190), uint64_t(0xA57E6339DD2CF3A0), uint64_t(0x1EF6E6DBB1961EC9)   uint64_t(0x31D71DCE64B2C310), uint64_t(0xF165B587DF898190), uint64_t(0xA57E6339DD2CF3A0), uint64_t(0x1EF6E6DBB1961EC9)
 }; };
 +</code>
  
 +----
  
 +==== 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(0xD0E4427A5514FB72), uint64_t(0x77C621CC9FB3A483), uint64_t(0x67A34DAC4356550B)   uint64_t(0xCF3145DE0ADD4289), uint64_t(0xD0E4427A5514FB72), uint64_t(0x77C621CC9FB3A483), uint64_t(0x67A34DAC4356550B)
 }; };
 +</code>
  
 +----
  
 +==== RANDOM_TURN ====
 +
 +<code cpp>
 constexpr uint64_t RANDOM_TURN = uint64_t(0xF8D626AAAF278509); constexpr uint64_t RANDOM_TURN = uint64_t(0xF8D626AAAF278509);
 </code> </code>
  
chess/programming/polyglot_book_format/key.1641907325.txt.gz · Last modified: 2022/01/11 13:22 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki