Announcing: The Great Battle of the Hash Codes
And you're invited to participate.
Soon I will give the not-yet-released version of
Oscar the option of reading its set of base hash code constants from a file at start time.
Oscar needs 824 of these codes, each 128 bits long. The input file is 824 codes, one per line, with each code represented as 32 hexadecimal digits. For an example input file, see
Oscar's default set at:
https://dl.dropboxusercontent.com/u/316 ... /HashCodes
Oscar's transposition table implementation is a vector with 2^N elements, with N=24 in the default configuration giving 24 bits of addressing (16,777,216 elements) using the least significant bits of a position's 128 bit signature.
Each signature maps onto two adjacent elements by wildcarding the bottom addressing bit. Both elements are searched during a fetch; on a stash, the element with the lesser perft subtotal is overwritten.
When a
perft() calculation is finished,
Oscar prints the table's utilization coefficient
Cu, the value of the count of used elements divided by the total number of elements. Note that bulk counting is used at the next to bottom ply and these bulk counts are not stored in the table.
With the default base hash code set:
Code: Select all
./operft "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" 5
4865609
Utilization: 0.000345
./operft "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" 6
119060324
Utilization: 0.004641
./operft "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" 7
Utilization: 0.053571
3195901860
./operft "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" 8
Utilization: 0.528047
84998978956
./operft "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" 9
Utilization: 0.999979
2439530234167
The goal is to have the hash code file which results in the greatest utilization coefficients. The codes should be easily reproduced in a quick, deterministic, and portable manner. Extra praise awarded to a winner who has a pseudorandom bit generator even simpler than Oscar's routine which uses a row of the first eight primes.
To participate, just post a link to your entry and I'll take it from there.