BertTuyt wrote:Joost, i also started to test my HashFunction.
See code at the end of this post
The position I examined first was the initial setup so with black man on 1 - 20, and white man on 31 - 50.
HashTable size 1M Entries ( 2^20).
At ply 20 I get 6 collisions.
Till ply 19 0.
Bert,
At the starting position with your hash-function I found 31 collisions at depth 20, 5 so times more, it took more then 10 minutes since I still use plain a-b.
The difference can be due to many things, index calculation, hash replacement scheme, larger tree due to different pruning etc., this is nothing to worry about.
The collision rate is more important, which is in this case roughly 1 out of 270 million matching probes.
You won't notice it when you have a collision now and then, in case of the Woldouby there are too many collisions, my guess is that it gets bad when there are kings on the board.
It won't be easy to make a simple and fast hash-function that has a performance as good as Zobrist.
Joost
Code: Select all
TT: num_buckets = 16777216, 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
- - - - -
- - - - -
M M M M M
M M M M M
M M M M M
M M M M M
Time = 622.41 Matching hash-probes = 8366650043 Matching probes/sec. = 13442279.755268
Collisions found 31
I also tried 19 ply and there are still 27 collisions, in the test program I probe in quiescence as well, maybe this explains why you didn't find collisions at 19 ply?
It is possible to store the offending positions and take a look at what is different about them.
Code: Select all
TT: num_buckets = 16777216, 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
- - - - -
- - - - -
M M M M M
M M M M M
M M M M M
M M M M M
Time = 390.52 Matching hash-probes = 5407588133 Matching probes/sec. = 13847225.596663
Collisions found 27
I start finding collisions at depth 17, here are two colliding positions, no kings on the board:
Code: Select all
Black to move.
Hash = 1330c679f492c49a
m m - m m
m m m - m
m m m m m
m m m m m
- - - M -
- M - - -
- - M - M
m M M M M
M M M M M
M M M - M
Hash = 1330c679f492c49a
m m - m m
m m m - m
m m m m m
m m m m m
m - - - -
M - - M M
- M - M M
M M - - -
M M M M -
M M M M M