Abstract arguments and trying to demonstrate points by words, mind control, or whatever you want, will not work. At least not here in this forum.Gusev wrote:Zobrist merely tries to ensure that, for any pair of positions, we are as unlikely to experience a collision as possible. This is not a chess-specific approach. Intuitively, it is somewhat wasteful in its generality, as it is trying to take equal care of pairs of positions one or both of which is illegal/unreachable and pairs of legal reachable positions (the only ones of practical interest). I am trying to design chess-specific hashing "biased" so as to minimize collisions between legal reachable positions. In order to achieve that, pseudo-randomness has to be abandoned. Instead, "intelligent design" is needed, so to speak. I am not claiming that I have already achieved that. But each example that makes legal reachable positions collide can lead to improvement of the directly designed technique. In the meanwhile, bad luck shall remain bad luck, for it's inherent to the non-chess-specific Zobrist approach that employs pseudo-randomness.lucasart wrote:XOR is better, but you will still have collisions. What you propose is exactly like Zobrist hashing, except that instead of generating zobrist keys at random, you use attack bitboards for the zobrist keys.ZirconiumX wrote:OK, talking to Dmitri confirms it was XOR, so my mistake.mcostalba wrote:For instance Ra1, Ba8 and Ra1, Bh1ZirconiumX wrote: Please demonstrate this, since with my stupid eyes I cannot see anything.
To moderation: Please be so kind to consider taking action against the the troll: it is many days already that he is dirtying up the threads. Normally this kind of people disappears after few days, but this one seems persistent so please evaluate about blocking the account.
With XOR, not OR, this doesn't collide.
Matthew:out
Whether this scheme collides less than Zobrist (assuming a proper random generator with good entropy and non zero keys at least) is not clear.
I can't think of a trivial example to make this collide, but I diden't give it much thought. I'm sure it's possible. At least I see no reason why it would collide less than random Zobrist.
You need to demonstrate your affirmations. The same goes to Matthew who has made many unfounded affirmations about this zobrist method being clearly better etc. It's not because a trivial counter-example cannot be found that the method works. That kind of simplistic reasoning is not scientific. It's excusable of a 14 year old but you should know better.
We can discuss this endlessly, but it's a waste of time and space. So far, no empirical study has been done to demonstrate that your zobrist keys are better than random ones. Please do such a study and come back with empirical evidence. At least theoretically, there's no reason why your zobrist should be better than random ones.
I remember measuring the quality of random generators for the purpose of zobrist hashing as follows:
- reduce the number of bits until collisions are measurable
- and measure the frequency of collisions in realistic scenarios (like a bunch of perft, started from a large collection of starting positions)
The conclusion was that:
- Mersenne Twister and Bob Jenkins' 64-bit PRNG are equally as good (properly seeded, obviously).
- LCG even "good ones" (ie. 2^64 periodic that at least passes many of the dieharder tests) are measurably worse.
I would not be surprised at all that your zobrist fails in a similar way to LCG in proper testing. LCG also is resistant to trivial collisions counter-examples, and it has the added benefit of passing many (not all) statistical tests as a random generator.

