Randomize a List problem
|
10-15-2020, 04:43 PM
Post: #31
|
|||
|
|||
RE: Randomize a List problem
(10-14-2020 04:12 AM)DavidM Wrote: In the case of LSHUF, the SplitMix64 result is instead treated as an integer for a MOD operation. Those last bits were creating a very noticeable bias and the fix was simply to discard the last 4 bits by shifting the 60 high-order bits to the right. It is a bad idea to use modulo to pick random elements. see http://www.azillionmonkeys.com/qed/random.html This is especially bad for shuffling list. Bias accumulate. First pick has a slight bias toward element x Second pick has a slight bias toward element y ... By the time shuffling is complete, bias is noticeable, heavily toward {x, y, ...} Good shuffling required unbiased ranged randoms, *and* good random number generator. see https://www.pcg-random.org/posts/bounded-rands.html (10-09-2020 04:52 PM)pier4r Wrote: Then I thought: what are the odds that we sit, without noticing each other, near to each other? This reminds me of pier4r's Little math problem(s) October 2020 Chance of encounter (each day) is miniscule. But, months goes by, what were rare is not rare anymore. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)