We modified the Stockfish chess engine, changing the width of the key stored in a transposition table entry, the key16 field in TTEntry, from 16 bits to 32 bits. This changes the key width effectively from 16+27 = 43 bits to 32+27 = 59 bits. The 27 comes from, in experiments below, hash table sizes such that there were 2^27 Clusters. The hash table was 3840 megabytes for 16-bit (with padding / alignment disabled, otherwise it would have been 4096), and 4608 megabytes for 32-bit. Hash 5000 was sufficient for both.
The tables below give the ranking of black responses to 1.e4, as reported by MultiPV 500 at various depths. The top line is 16-bit unmodified Stockfish, 1 Thread. The second line is 32-bit. The colors are randomly assigned to moves.
Snapshot of the code used to generate the output below is on github. Here is a patch against Official Stockfish 1c0c4db6775fae5a8b785630f4fd406c235880d9.
This is a work in progress. In the future, we hope to explore even wider hashes, wide enough that hash collisions do not occur. We may also explore the region between 16 and 32 bits.
Here are more complete logs, including scores and pv. "before" is 16-bit; "after" is 32-bit.
Previous work: Hyatt and Cozzie, "The effect of hash collisions in a Computer Chess program", which concludes that collisions do not affect performance much. However, we feel that with computers having gotten much more powerful, and people running very long analyses, the birthday paradox is having a significant effect, as seen below. Hash table collisions are obscuring the answer to the question, what is the ground truth about a position? What is the best response to 1.e4? Open game, French, Sicilian, Caro-Kann, or Nimzowitsch?
Depth 1
d5 | e5 | e6 | d6 | Nf6 | Nc6 | h5 | g6 | c5 | Nh6 | g5 | b6 | c6 | a5 | h6 | a6 | Na6 | f6 | f5 | b5 |
d5 | e5 | e6 | d6 | Nf6 | Nc6 | h5 | g6 | c5 | Nh6 | g5 | b6 | c6 | a5 | h6 | a6 | Na6 | f6 | f5 | b5 |
Depth 2
d5 | e5 | e6 | d6 | Nc6 | h5 | Nf6 | c5 | b6 | g6 | Na6 | c6 | h6 | a5 | g5 | Nh6 | f5 | f6 | a6 | b5 |
d5 | e5 | e6 | d6 | Nc6 | h5 | Nf6 | c5 | b6 | g6 | Na6 | c6 | h6 | a5 | g5 | Nh6 | f5 | f6 | a6 | b5 |
Depth 3
d5 | e5 | Nc6 | Nf6 | h5 | d6 | e6 | h6 | b6 | c5 | Na6 | c6 | a5 | Nh6 | g6 | a6 | g5 | b5 | f6 | f5 |
d5 | e5 | Nc6 | Nf6 | h5 | d6 | e6 | h6 | b6 | c5 | Na6 | c6 | a5 | Nh6 | g6 | a6 | g5 | b5 | f6 | f5 |
Depth 4
d5 | Nc6 | e5 | d6 | e6 | c6 | c5 | f6 | f5 | h5 | Nh6 | h6 | g6 | a5 | a6 | g5 | b5 | Na6 | b6 | Nf6 |
d5 | Nc6 | e5 | d6 | e6 | c6 | c5 | f6 | f5 | h5 | Nh6 | h6 | g6 | a5 | a6 | g5 | b5 | Na6 | b6 | Nf6 |
Depth 5
Nc6 | d5 | Nf6 | h5 | c6 | e5 | h6 | a6 | e6 | d6 | b6 | a5 | Nh6 | c5 | g6 | Na6 | b5 | f6 | g5 | f5 |
Nc6 | d5 | Nf6 | h5 | c6 | e5 | h6 | a6 | e6 | d6 | b6 | a5 | Nh6 | c5 | g6 | Na6 | b5 | f6 | g5 | f5 |
Depth 6
d5 | Nc6 | e5 | e6 | h5 | c6 | f5 | c5 | d6 | h6 | f6 | Na6 | Nf6 | a6 | g6 | b6 | a5 | Nh6 | b5 | g5 |
d5 | Nc6 | e5 | e6 | h5 | c6 | f5 | c5 | d6 | h6 | f6 | Na6 | Nf6 | a6 | g6 | b6 | a5 | Nh6 | b5 | g5 |
Depth 7
e5 | d5 | f5 | c5 | Nf6 | d6 | e6 | h6 | a5 | Nc6 | h5 | b6 | Na6 | a6 | c6 | b5 | Nh6 | f6 | g6 | g5 |
e5 | d5 | f5 | c5 | Nf6 | d6 | e6 | h6 | a5 | Nc6 | h5 | b6 | Na6 | a6 | c6 | b5 | Nh6 | f6 | g6 | g5 |
Depth 8
d5 | e5 | f5 | Nc6 | Nf6 | a6 | e6 | c5 | h5 | b6 | d6 | Na6 | c6 | a5 | h6 | b5 | Nh6 | g5 | f6 | g6 |
d5 | e5 | f5 | Nc6 | Nf6 | a6 | e6 | c5 | h5 | b6 | d6 | Na6 | c6 | a5 | h6 | b5 | Nh6 | g5 | f6 | g6 |
Depth 9
e5 | e6 | Nf6 | c5 | d5 | a5 | Nc6 | c6 | d6 | h6 | h5 | a6 | f5 | b6 | f6 | Nh6 | b5 | g5 | Na6 | g6 |
e5 | e6 | Nf6 | c5 | d5 | a5 | Nc6 | c6 | d6 | h6 | h5 | a6 | f5 | b6 | f6 | Nh6 | b5 | g5 | Na6 | g6 |
Depth 10
e5 | d5 | Nc6 | e6 | c5 | a6 | h5 | d6 | c6 | h6 | b6 | g6 | Nf6 | f6 | a5 | Na6 | f5 | Nh6 | b5 | g5 |
e5 | d5 | Nc6 | e6 | c5 | a6 | h5 | d6 | c6 | h6 | b6 | g6 | Nf6 | f6 | a5 | Na6 | f5 | Nh6 | b5 | g5 |
Depth 11
e5 | e6 | Nc6 | h6 | a6 | c6 | c5 | d5 | Nf6 | d6 | b6 | h5 | g6 | a5 | f5 | f6 | Na6 | Nh6 | b5 | g5 |
e5 | e6 | Nc6 | h6 | a6 | c6 | c5 | d5 | Nf6 | d6 | b6 | h5 | g6 | a5 | f5 | f6 | Na6 | Nh6 | b5 | g5 |
Depth 12
e5 | e6 | d5 | a6 | c6 | d6 | c5 | Nc6 | h6 | b6 | Nf6 | a5 | h5 | Nh6 | f5 | Na6 | g6 | f6 | g5 | b5 |
e5 | e6 | d5 | c6 | a6 | d6 | Nc6 | c5 | h6 | h5 | Nf6 | f5 | b6 | a5 | g6 | f6 | g5 | Nh6 | Na6 | b5 |
Depth 13
e5 | e6 | Nc6 | c6 | a6 | c5 | d5 | d6 | h6 | h5 | Nf6 | b6 | a5 | g6 | Nh6 | Na6 | f5 | g5 | f6 | b5 |
e5 | e6 | a6 | c5 | Nc6 | d5 | c6 | h6 | d6 | Nh6 | b6 | h5 | Nf6 | a5 | f5 | g6 | Na6 | f6 | g5 | b5 |
Depth 14
e5 | e6 | h6 | c5 | a6 | Nc6 | c6 | d5 | Nf6 | g6 | d6 | b6 | h5 | a5 | Nh6 | g5 | f5 | Na6 | f6 | b5 |
e5 | e6 | c5 | a6 | h6 | Nf6 | Nc6 | c6 | d6 | d5 | h5 | b6 | a5 | g6 | Na6 | f5 | f6 | g5 | Nh6 | b5 |
Depth 15
e6 | e5 | Nc6 | a6 | c5 | c6 | d5 | h6 | Nf6 | d6 | g6 | b6 | h5 | Nh6 | a5 | g5 | Na6 | f6 | f5 | b5 |
e6 | e5 | h6 | c5 | d5 | a6 | c6 | Nc6 | d6 | Nf6 | g6 | h5 | a5 | b6 | Na6 | f6 | g5 | Nh6 | f5 | b5 |
Depth 16
e6 | d6 | c5 | h6 | e5 | Nc6 | Nf6 | a6 | c6 | d5 | g6 | h5 | a5 | b6 | Nh6 | f6 | Na6 | g5 | f5 | b5 |
e5 | e6 | h6 | c5 | Nc6 | d5 | d6 | c6 | Nf6 | a6 | g6 | b6 | h5 | a5 | Na6 | g5 | f6 | Nh6 | f5 | b5 |
Depth 17
e6 | e5 | Nc6 | d6 | c5 | Nf6 | h6 | c6 | d5 | a6 | g6 | b6 | h5 | a5 | Na6 | Nh6 | f6 | g5 | f5 | b5 |
e5 | e6 | c5 | h6 | c6 | Nc6 | d5 | Nf6 | b6 | d6 | a6 | g6 | a5 | h5 | Nh6 | Na6 | f6 | g5 | f5 | b5 |
Depth 18
e5 | c5 | e6 | Nc6 | c6 | d6 | h6 | a6 | Nf6 | b6 | d5 | a5 | g6 | h5 | Na6 | Nh6 | f5 | g5 | f6 | b5 |
e5 | Nc6 | e6 | c6 | c5 | b6 | Nf6 | h6 | a6 | d6 | d5 | g6 | a5 | h5 | Na6 | Nh6 | f6 | b5 | g5 | f5 |
Depth 19
e6 | e5 | c5 | Nc6 | a6 | c6 | b6 | d6 | h6 | Nf6 | d5 | g6 | a5 | h5 | Na6 | Nh6 | f6 | g5 | f5 | b5 |
c5 | e6 | e5 | Nc6 | b6 | c6 | h6 | a6 | d6 | d5 | Nf6 | g6 | Na6 | a5 | h5 | Nh6 | f6 | g5 | b5 | f5 |
Depth 20
e6 | c5 | Nc6 | e5 | b6 | h6 | c6 | d6 | Nf6 | a6 | d5 | g6 | a5 | h5 | Na6 | Nh6 | f6 | g5 | f5 | b5 |
c5 | e6 | e5 | h6 | c6 | b6 | Nc6 | d6 | a6 | d5 | Nf6 | g6 | Na6 | a5 | h5 | Nh6 | g5 | f6 | f5 | b5 |
Depth 21
e5 | e6 | c5 | b6 | c6 | h6 | Nc6 | d6 | Nf6 | a6 | Na6 | a5 | d5 | g6 | h5 | Nh6 | f6 | f5 | g5 | b5 |
e6 | c5 | e5 | Nc6 | b6 | c6 | d6 | a6 | h6 | Nf6 | g6 | d5 | a5 | Na6 | h5 | Nh6 | f6 | g5 | f5 | b5 |
Depth 22
e5 | e6 | Nc6 | c5 | c6 | a6 | b6 | h6 | d6 | Nf6 | d5 | Na6 | g6 | a5 | h5 | f6 | Nh6 | b5 | g5 | f5 |
e6 | e5 | Nc6 | c5 | b6 | a6 | c6 | d6 | h6 | Nf6 | d5 | g6 | Na6 | a5 | Nh6 | h5 | f6 | f5 | g5 | b5 |
Depth 23
c5 | e6 | e5 | Nc6 | c6 | h6 | d6 | a6 | b6 | Nf6 | d5 | Na6 | g6 | a5 | h5 | Nh6 | f6 | g5 | f5 | b5 |
Nc6 | c5 | e6 | b6 | e5 | d6 | a6 | c6 | Nf6 | h6 | a5 | d5 | g6 | Na6 | h5 | Nh6 | f6 | g5 | f5 | b5 |
Depth 24
e5 | c5 | e6 | Nc6 | c6 | b6 | d6 | h6 | a6 | Nf6 | g6 | Na6 | d5 | a5 | h5 | Nh6 | f6 | g5 | f5 | b5 |
c5 | e5 | e6 | b6 | Nc6 | h6 | c6 | d6 | Nf6 | a6 | a5 | d5 | g6 | Na6 | h5 | f6 | Nh6 | f5 | g5 | b5 |
Depth 25
e5 | e6 | c5 | Nc6 | c6 | b6 | h6 | d6 | a6 | Nf6 | a5 | d5 | g6 | Na6 | h5 | f6 | Nh6 | b5 | g5 | f5 |
e5 | e6 | Nc6 | c5 | d6 | c6 | b6 | a6 | d5 | h6 | a5 | g6 | Nf6 | Na6 | h5 | Nh6 | f6 | g5 | b5 | f5 |
Depth 26
e5 | e6 | Nc6 | c5 | c6 | d6 | b6 | a6 | h6 | Nf6 | d5 | g6 | a5 | Na6 | h5 | Nh6 | f6 | g5 | f5 | b5 |
e5 | e6 | Nc6 | c5 | c6 | d6 | a6 | b6 | h6 | d5 | Nf6 | a5 | g6 | Na6 | h5 | f6 | Nh6 | g5 | f5 | b5 |
Depth 27
e6 | e5 | c5 | c6 | Nc6 | d6 | a6 | b6 | h6 | g6 | Nf6 | d5 | Na6 | a5 | h5 | f6 | Nh6 | g5 | f5 | b5 |
e6 | e5 | c5 | Nc6 | c6 | d6 | a6 | b6 | h6 | d5 | g6 | Nf6 | a5 | Na6 | h5 | Nh6 | f6 | f5 | g5 | b5 |
Depth 28
e6 | c5 | e5 | c6 | Nc6 | a6 | d6 | h6 | b6 | g6 | Nf6 | a5 | d5 | Na6 | h5 | Nh6 | f6 | g5 | b5 | f5 |
e6 | e5 | c6 | c5 | Nc6 | h6 | b6 | Nf6 | a6 | d6 | a5 | d5 | g6 | Na6 | Nh6 | h5 | f6 | b5 | f5 | g5 |
Depth 29
e5 | Nc6 | c6 | e6 | c5 | a6 | d6 | h6 | g6 | Nf6 | a5 | b6 | d5 | Na6 | h5 | Nh6 | f6 | b5 | g5 | f5 |
c5 | e5 | Nc6 | e6 | c6 | h6 | d6 | b6 | Nf6 | a6 | d5 | a5 | g6 | Na6 | Nh6 | h5 | f6 | g5 | f5 | b5 |
Depth 30
e5 | e6 | c5 | c6 | Nc6 | a6 | d6 | Nf6 | h6 | a5 | g6 | d5 | b6 | Na6 | h5 | Nh6 | f6 | b5 | f5 | g5 |
c5 | e5 | Nc6 | e6 | h6 | c6 | Nf6 | d6 | a6 | b6 | a5 | d5 | g6 | Na6 | h5 | Nh6 | f6 | b5 | f5 | g5 |
Depth 31
e5 | e6 | c5 | Nc6 | c6 | a6 | Nf6 | a5 | d6 | h6 | d5 | g6 | b6 | Na6 | h5 | Nh6 | f6 | f5 | b5 | g5 |
e5 | c5 | e6 | Nc6 | b6 | h6 | c6 | d6 | a6 | Nf6 | d5 | a5 | g6 | Na6 | Nh6 | h5 | f6 | f5 | g5 | b5 |
Depth 32
Nc6 | c5 | e6 | e5 | c6 | a6 | b6 | d6 | g6 | Nf6 | h6 | a5 | d5 | Na6 | h5 | Nh6 | f6 | f5 | g5 | b5 |
e5 | e6 | c5 | c6 | Nc6 | b6 | Nf6 | d6 | d5 | a6 | g6 | h6 | a5 | Na6 | Nh6 | h5 | f6 | f5 | b5 | g5 |
Depth 33
e6 | Nc6 | e5 | c5 | c6 | a6 | b6 | Nf6 | h6 | d6 | g6 | d5 | a5 | Na6 | h5 | Nh6 | f6 | f5 | g5 | b5 |
e6 | e5 | Nc6 | c5 | c6 | b6 | Nf6 | d6 | a6 | d5 | h6 | g6 | a5 | Na6 | h5 | Nh6 | f6 | f5 | g5 | b5 |
Depth 34
e6 | e5 | c5 | c6 | a6 | Nc6 | a5 | b6 | d5 | Nf6 | d6 | h6 | g6 | Na6 | h5 | Nh6 | f6 | f5 | b5 | g5 |
c5 | e5 | Nc6 | c6 | e6 | a6 | d6 | b6 | Nf6 | g6 | d5 | a5 | h6 | Na6 | h5 | Nh6 | f6 | f5 | b5 | g5 |
Depth 35
e6 | c5 | c6 | a6 | Nc6 | d6 | e5 | Nf6 | a5 | h6 | b6 | d5 | g6 | Na6 | Nh6 | h5 | f6 | f5 | g5 | b5 |
e6 | e5 | c5 | c6 | Nc6 | Nf6 | a6 | d6 | a5 | d5 | g6 | h6 | b6 | Na6 | h5 | Nh6 | f6 | f5 | b5 | g5 |
Depth 36
e6 | c5 | c6 | Nc6 | e5 | d6 | Nf6 | g6 | a5 | a6 | d5 | h6 | b6 | Na6 | h5 | Nh6 | f6 | f5 | g5 | b5 |
e5 | e6 | c5 | c6 | Nc6 | a6 | Nf6 | g6 | d6 | d5 | a5 | b6 | h6 | Na6 | h5 | Nh6 | f6 | f5 | b5 | g5 |
No comments :
Post a Comment