News for hackers. Stuff that matters.
Re:A New Algorithm for Controlled Randomness by ur-whale on Sunday September 01, 2019 @04:30PM (#20854694)
There's actually an interesting experiment to run, which is as follows:

       - take some non-uniform a continuous distribution with finite support.
       - discretize it into a N-bucket histogram
       - apply the alias algorithm
       - display the result
       - increase N
       - rinse and repeat
The resulting animation is likely going to be interesting.

I suspect it won't be stable at all and might veer into the fractal at some point.

Re:A New Algorithm for Controlled Randomness by dahart on Sunday September 01, 2019 @05:12PM (#20854929)
Should be easy to try, maybe I’ll do it if I understand correctly what you’re thinking about...

It sounds like you’re thinking of a feedback loop, where I pick, say 1000 uniform samples, then run them through the alias map, and then run those results back through the alias map, etc., while each time increasing the number of buckets for the alias map?

I would assume the output distribution range is either [0,1] or we re-normalize the samples every time through the alias map?

Is that what you’re thinking of, or are you suggesting to visualize the map directly, and not a bunch of samples?

For a feedback loop on samples, I guess I might expect the samples to eventually converge with all samples at the function’s maximum. But if you mean to track and visualize all the little intervals in the alias map through itself several times, yeah, that might be a bit wild to see.