in reply to Re: Randomly choosing from a set of alternatives with varying popularity
in thread Randomly choosing from a set of alternatives with varying popularity
I suspect you've misunderstood the 'popular' algorithm: 550 is the sum of the votes, so if (for example) the hash is traversed in order of decreasing popularity, rolling 0..99 will give alligator, 100..179 will give bear, etc., until 540..549 gives jellyfish. As far as I know this is pretty much the standard approach (up to optimizations) for picking from a set with weights.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Randomly choosing from a set of alternatives with varying popularity
by LanX (Saint) on Mar 28, 2022 at 08:59 UTC | |
by LanX (Saint) on Mar 28, 2022 at 10:16 UTC | |
by ibm1620 (Hermit) on Mar 28, 2022 at 13:45 UTC | |
by LanX (Saint) on Mar 28, 2022 at 16:11 UTC |