Re:How Do Computers Generate Random Numbers?
by IIAOPSW on Monday September 14, 2020 @12:40AM
(#24466812)
My personal favorite RNG is the logistical map. x_{n+1} = 4x_n(1-x_n). There is no hidden seed beyond the current output. Thus if you have a scientific calculator that lets you refer to the value on screen then you can rig it into an RNG. Seeing a simple, non-programmable machine "misbehave" and act random melts my mind a little.
[ Parent
| on HN ]
Re:How Do Computers Generate Random Numbers?
by phreeza on Monday September 14, 2020 @03:52AM
(#24467829)
Beware that while it looks random, this is actually not a great rng. For example, it does not satisfy the central limit theorem.
Re:How Do Computers Generate Random Numbers?
by bregma on Monday September 14, 2020 @07:31AM
(#24468937)
That's still just a linear congruential PRNG with state sizeof(unsigned int). LCG is simple and has well-known flaws.
Re:How Do Computers Generate Random Numbers?
by IIAOPSW on Monday September 14, 2020 @07:30PM
(#24476318)
No it is not an LCG. When you distribute the terms there is a -4x_n^2. Therefore it is non-linear.
Re:How Do Computers Generate Random Numbers?
by kanzenryu2 on Monday September 14, 2020 @03:45AM
(#24467797)
You might find this ultra-simple RNG interesting https://en.wikipedia.org/wiki/Rule_30