- May 3, 2002
- 2,389
- 0
- 0
How does a random number generator work? Is it based on a mathematical algorithm that has an infinite number of answers? If in a hardware form, how would it work then (perhaps slot machines use them?)?
Even that's predictable and unreliable.To get real random numbers, you need some kind of real random input -- like a noisy diode or a geiger counter.
Originally posted by: dejitaru
Even that's predictable and unreliable.To get real random numbers, you need some kind of real random input -- like a noisy diode or a geiger counter.
With all due respect, your statement makes no sense. It's good that you have no idea what it means, since it is in fact meaningless.Originally posted by: Shalmanese
I think that they actually found some order in the lower level bits in the decay of an unstable particle. I have no idea what that means but, effectively, radioactive decay cannot be considered "truely" random.
I had a similar experience. What I was doing wrong was using "RANDOMIZE" to set the seed to the value of "TIMER." before each and every random number I generated. Since each call to RANDOMIZE resets the number sequence, and since the program runs fast enough that each call to TIMER is only slightly different, any numbers generated in that fasion will be in a very predictable sequence. Only call RANDOMIZE once per each time you want a sequence, and you will have somewhat more "random" numbers.Originally posted by: Jeff7
I created a Qbasic program awhile back that would output dots on the screen "randomly." They formed a pattern of diagonal lines. Not exactly random.
Originally posted by: Shalmanese
I think that they actually found some order in the lower level bits in the decay of an unstable particle. I have no idea what that means but, effectively, radioactive decay cannot be considered "truely" random.
Originally posted by: jliechty
I had a similar experience. What I was doing wrong was using "RANDOMIZE" to set the seed to the value of "TIMER." before each and every random number I generated. Since each call to RANDOMIZE resets the number sequence, and since the program runs fast enough that each call to TIMER is only slightly different, any numbers generated in that fasion will be in a very predictable sequence. Only call RANDOMIZE once per each time you want a sequence, and you will have somewhat more "random" numbers.Originally posted by: Jeff7
I created a Qbasic program awhile back that would output dots on the screen "randomly." They formed a pattern of diagonal lines. Not exactly random.
FWIW, some modern operating systems (OpenBSD?) use many sources of "entropy" to feed their random number generation function. Apparently this helps with cryptography, though I don't claim to understand why. More info here, if you're interested.
Originally posted by: Peter
The silliest cryptography attempt was an early revision of my local bank's internet software ... the Java applet would insist you wave the mouse around in its window for a few seconds before continuing
Get a random seed. Generate a random number and use this for a new seed. Repeat with multiples, powers, square roots, etc. of your new number. -The exact algorithm would, of course, need be highly classified. Repeat. Repeat.A related question: How much would it cost to build a real random number generator into a CPU or chipset and do any CPU's have one (ie. Sparcs, Alphas etc). Are there any plans to put one into a consumer class CPU? I imagine it would be very useful for crypto use.