Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: About random numbers and hashing

Author: Ralf Elvsén

Date: 15:28:58 12/08/01

Go up one level in this thread


On December 08, 2001 at 12:25:59, Sven Reichard wrote:

>Just a few more comments; sorry I've not been around for a couple of days.
>
>The idea that "just a couple of bits have to change" to get from one vector to
>another is important in error correcting codes, since there we deal with a
>symmetric binary channel where during transmission each bit has an equal
>probability of being flipped due to noise. Hence in this case, the Hamming
>distance is *the* quality criterion if we can decode the received code by
>finding the "closest" code word.
>However I hope that my data bus does not represent such a channel; i.e., there
>is no noise in my system.
>About linear independence: If you pick 768 random vectors of length 64, then
>they span the whole space with probability close to 1 (I haven't exactly
>computed that, and I don't intend to do it.)
>About portability of RNG's: As others have pointed out before, the easiest way
>to achieve portability is to generate the codes a priori, store them in a file,
>and include them in the distribution. Even using only one compiler, the RNG
>could be changed in the next version, making your opening book worthless.
>
>David, could you once more point out which of the following statements you
>disagree with?
>a) We want to avoid different positions getting the same code.
>b) We especially don't want that to happen close to the root.
>c) Hence, we want positions that are only a few moves apart to have different
>codes.
>d) That means that we want small sets of hash codes to be linearly independent.
>e) Linear independence isn't affected by linear transformations.
>f) The Hamming distance does depend on the choice of the vector space base.
>g) Given a set of vectors with minimal weight and minimal distance 17, there is
>a linear transformation moving it to a set of minimal weight 1 and minimal
>distance 2 (which in terms of linear independence is just as good as the one we
>started with).
>h) Given all of the above, the Hamming distance appears to be totally unrelated
>to the quality of our set.
>
>As I said before, if your Hamming criterion works better than pure random
>numbers, that's fine with me; I would just like to understand the reason why.
>Always the inquisitive mind...
>
>Actually, the problem of hash codes is a little bit more complicated, since we
>also want to avoid minor collisions, i.e., different positions occupying the
>same spot in the transposition table. Since usually the first 20 bits of the
>hash key determine that position, we would like to avoid linear independence
>also for small sets of these truncated vectors.

Yes, since your first(?) post about the non-invarianve of the Hamming-
distance under rotaions I have started to suspect that for some reason
the "Hamming-generated" numbers were better in this sense (i.e. better
distributed). But it makes no sense why it should be so...

Ralf

Have you tried applying the
>Hamming criterion to these leading bits?
>
>Enough for today :)
>Sven



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.