![Very Happy :D](./images/smilies/icon_biggrin.gif)
Any idea about speed compared with Zobrist?
Bert
Still no collisions, it looks very good now. It was a bit stupid of me that I overlooked pieces[color] and put men[color] instead.BertTuyt wrote:Also not sure you need the last 3 instructions:
And also dont know, if this is compared with Zobrist faster.Code: Select all
h ^= h >> r; h *= m; h ^= h >> r;
But at least it is elegant
And according the web the alternatives CityHash and SpookyHash should be faster......
Bert
Code: Select all
TT: num_buckets = 4194304, tt_size = 1140850688
Allocated TT with size 1140850688 in SP memory.
- - - - -
- - - - -
- m m m -
m - m m -
m - m m M
m M M - M
- M M M M
- M M - -
- - - - -
- - - - -
Time = 19.38 Matching hashprobes = 125367560 Matching probes/sec. = 6470117.584701
Collisions found 0
Code: Select all
TT: num_buckets = 4194304, tt_size = 1140850688
Allocated TT with size 1140850688 in SP memory.
- - - - -
- - - - -
- m m m -
m - m m -
m - m m M
m M M - M
- M M M M
- M M - -
- - - - -
- - - - -
Time = 19.14 Matching hashprobes = 123631680 Matching probes/sec. = 6458456.791772
Collisions found 0
Code: Select all
TT: num_buckets = 4194304, tt_size = 1140850688
Allocated TT with size 1140850688 in SP memory.
- - - - -
- - - - -
- m m m -
m - m m -
m - m m M
m M M - M
- M M M M
- M M - -
- - - - -
- - - - -
Time = 19.06 Matching hashprobes = 125367560 Matching probes/sec. = 6576537.188177
Collisions found 0
Bert, Unfortunately it makes no difference for the playing strength (the speed I mean).BertTuyt wrote:Joost, seems to look interesting and promising.
Here Woldouby at ply 28, 30.5G HashEntries, and no collisions.
And Cityhash() and SpookyHash() seems to be even faster.......
Bert
Code: Select all
id name Dwarf 0.0
id author Draughts Community
ready
HashTable Allocated, Entries = 1048576
pos XW XB 10 10
info Depth 107 knps 0
Hash Probes = 7 Hash Entry = 0 Collisions = 0
info Depth 2019 knps 0
Hash Probes = 19 Hash Entry = 0 Collisions = 0
info Depth 310043 knps 0
Hash Probes = 43 Hash Entry = 6 Collisions = 0
info Depth 4072 knps 0
Hash Probes = 72 Hash Entry = 14 Collisions = 0
info Depth 50161 knps 0
Hash Probes = 161 Hash Entry = 39 Collisions = 0
info Depth 60325 knps 0
Hash Probes = 325 Hash Entry = 85 Collisions = 0
info Depth 70549 knps 0
Hash Probes = 549 Hash Entry = 170 Collisions = 0
info Depth 8-1001566 knps 0
Hash Probes = 1566 Hash Entry = 344 Collisions = 0
info Depth 904051 knps 0
Hash Probes = 4051 Hash Entry = 929 Collisions = 0
info Depth 10-1008286 knps 0
Hash Probes = 8286 Hash Entry = 2088 Collisions = 0
info Depth 11017767 knps 0
Hash Probes = 17767 Hash Entry = 4630 Collisions = 0
info Depth 12029759 knps 0
Hash Probes = 29759 Hash Entry = 8539 Collisions = 0
info Depth 13078819 knps 0
Hash Probes = 78819 Hash Entry = 21545 Collisions = 0
info Depth 14-100144301 knps 14430
Hash Probes = 144301 Hash Entry = 39340 Collisions = 0
info Depth 15-100377166 knps 12572
Hash Probes = 377166 Hash Entry = 106267 Collisions = 0
info Depth 16-100797975 knps 15959
Hash Probes = 797975 Hash Entry = 210708 Collisions = 0
info Depth 17-201394363 knps 15492
Hash Probes = 1394363 Hash Entry = 414335 Collisions = 0
info Depth 18-2003817462 knps 14138
Hash Probes = 3817462 Hash Entry = 1004686 Collisions = 0
info Depth 19-1007088960 knps 15082
Hash Probes = 7088960 Hash Entry = 2245543 Collisions = 0
info Depth 20-10020054239 knps 16573
Hash Probes = 20054239 Hash Entry = 5519515 Collisions = 0
info Depth 21-10040641388 knps 15511
Hash Probes = 40641388 Hash Entry = 13728146 Collisions = 0
info Depth 22-100111633402 knps 17497
Hash Probes = 111633402 Hash Entry = 35875513 Collisions = 1
info Depth 23-100282735786 knps 16680
Hash Probes = 282735786 Hash Entry = 111445253 Collisions = 85
info Depth 24-1001027555382 knps 19494
Hash Probes = 1027555382 Hash Entry = 373609660 Collisions = 1343
Code: Select all
HASHKEY Hash_Ed(BITBOARD* b)
{
int i;
uint64_t hash = 0, *k;
k = (uint64_t *)b;
for (i = 0; i < 3; ++i) {
hash += (k[i] << 25) - k[i];
hash ^= (hash >> 23);
hash += (hash << 4);
hash ^= (hash >> 6);
hash += (hash << 8);
hash ^= (hash >> 10);
hash += (hash << 26);
hash ^= (hash >> 31);
}
return (hash);
}
Code: Select all
id name Dwarf 0.0
id author Draughts Community
ready
HashTable Allocated, Entries = 1048576
pos XW XB 10 10
info Depth 107 knps 0
Hash Probes = 7 Hash Entry = 0 Collisions = 0
info Depth 2019 knps 0
Hash Probes = 19 Hash Entry = 0 Collisions = 0
info Depth 310043 knps 0
Hash Probes = 43 Hash Entry = 6 Collisions = 0
info Depth 4072 knps 0
Hash Probes = 72 Hash Entry = 14 Collisions = 0
info Depth 50161 knps 0
Hash Probes = 161 Hash Entry = 39 Collisions = 0
info Depth 60325 knps 0
Hash Probes = 325 Hash Entry = 85 Collisions = 0
info Depth 70549 knps 0
Hash Probes = 549 Hash Entry = 170 Collisions = 0
info Depth 8-1001566 knps 0
Hash Probes = 1566 Hash Entry = 344 Collisions = 0
info Depth 904051 knps 0
Hash Probes = 4051 Hash Entry = 929 Collisions = 0
info Depth 10-1008286 knps 0
Hash Probes = 8286 Hash Entry = 2087 Collisions = 0
info Depth 11017767 knps 0
Hash Probes = 17767 Hash Entry = 4625 Collisions = 0
info Depth 12029759 knps 0
Hash Probes = 29759 Hash Entry = 8534 Collisions = 0
info Depth 13078819 knps 0
Hash Probes = 78819 Hash Entry = 21526 Collisions = 0
info Depth 14-100144301 knps 14430
Hash Probes = 144301 Hash Entry = 39389 Collisions = 0
info Depth 15-100377166 knps 12572
Hash Probes = 377166 Hash Entry = 106234 Collisions = 0
info Depth 16-100797975 knps 13299
Hash Probes = 797975 Hash Entry = 210639 Collisions = 0
info Depth 17-201394363 knps 12676
Hash Probes = 1394363 Hash Entry = 414193 Collisions = 0
info Depth 18-2003817462 knps 13633
Hash Probes = 3817462 Hash Entry = 1004683 Collisions = 0
info Depth 19-1007088960 knps 12889
Hash Probes = 7088960 Hash Entry = 2246208 Collisions = 0
info Depth 20-10020054239 knps 14324
Hash Probes = 20054239 Hash Entry = 5519737 Collisions = 0
info Depth 21-10040641388 knps 13592
Hash Probes = 40641388 Hash Entry = 13730447 Collisions = 0
info Depth 22-100111633402 knps 15208
Hash Probes = 111633402 Hash Entry = 35876067 Collisions = 0
info Depth 23-100282735786 knps 14150
Hash Probes = 282735786 Hash Entry = 111446420 Collisions = 0
info Depth 24-1001027555382 knps 16396
Hash Probes = 1027555382 Hash Entry = 373619406 Collisions = 0
info Depth 25-1002469792688 knps 13997
Hash Probes = 2469792688 Hash Entry = 1111136629 Collisions = 0
Code: Select all
I tried to do some curve fitting on the current data.
As I expect a maximum rating (or pScore), and diminishing returns, I applied the next formula.
pScore = a * ( b - exp ( c * depth ) )
The values found were: a = 1,2665423, b = 0,675251 c - -0,077102341
The regression coefficient 0,99.
With these values I "predicted" the ELO rating for depth = 24 (currently in progress) and higher "virtual" depths.
To my surprise the ELO tops at around 300.
That the ELO tops is a consequence of the formula applied, but i expected something around 150.