Author: Tom Likens
Date: 19:59:17 09/03/03
Go up one level in this thread
On September 03, 2003 at 16:28:14, Dieter Buerssner wrote: >On September 03, 2003 at 13:43:13, Tom Likens wrote: > >>Getting the hamming distance in pseudo-code for N random numbers: >> >>1. Generate a random number (index=M) >> >>2. Compare it to the 0 ... M-1 valid random numbers alread saved >> >> if (popcnt64(new_rand64 ^ array[0..M-1]) >= MIN_HAM) then OK >> >>3. If valid, save it into slot M >> If not valid (hamming distance is too small) goto 1 >> >>4. Repeat until you have N random numbers > >They aren't random anymore, after you filtered them like that. > >I doubt, that it will help. It is not clear at all to me, that a big hamming >distance gives less collisions, when you combine many such numbers with xor (or >other operations like add or subtract). > >See also http://www.chess-archive.com/ccc.php?find_thread=200622, especially >Sven Reichards post, where he gave one concrete example. > >Regards, >Dieter You're correct of course, the set of numbers generated with the above algorithm is no longer pseudo-random and I should have been more precise in my wording. On the other hand, we don't really care about obtaining a set of random numbers, but instead we are looking for the set of "magic" numbers that will minimize the number of collisions we see during the search. What the properties of those numbers need to be is open for discussion. Thanks for pointing out the above thread. I'm also not convinced about the validity of Hamming distance vs. purely random numbers. But after reading the above thread, I can tell I'm not alone. There really was no definite conclusion drawn, as far as I could discern. But a large amount of *very* interesting theory was debated. Particularly, interesting were the discussions between Sven and David. regards, --tom
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.