#### Archived

This topic is now archived and is closed to further replies.

# To heck with random numbers...

This topic is 6929 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''ve got a little thesis I''d like you to have a look. Keep in mind that I''ve read very little math so it''s completely out of the blue... I believe that there is no possible way of calculating a random number on a computer. C++''s rand() procudes pseudo-random numbers as well as VB''s rnd() too (Microsoft''s help files say that). I''ve also found a document on how to produce pseudo-random numbers at FlipCode, based on some university research of some kind, so it''s got me thinking. Of course you can come pretty close (and for a normal user quite enough) to a random series of numbers, but not "really" random. An example is VB''s rnd() that is based on the current system time, which in this case is cheating. No matter what complex algorithms you use, everything in math is constant and no random things exists at all. Or was I asleep when my math teacher explained this... Please, prove me wrong. ============================ Daniel Netz, Sentinel Design "I'm not stupid, I'm from Sweden" - Unknown

##### Share on other sites
You can''t be proved wrong. It''s a fact that you can''t have purely random (digital) numbers.

When I init the random queue:
srand(TimeGetTime()); // this may not be the right syntax

I am going to get the same list of numbers if I do this command exactly when the system clock rolls over. When this is, I don''t have a clue, but it will happen some time.

The closest you could get would be to attach some physical device (a wheel, etc) to a serial port and poll it for random values. This may not qualify as random either, BTW, but it would be closer.

##### Share on other sites
you''re right, nothing is truly random. there''s actually a whole science devoted to this, synergetics (study of chaos)

-goltrpoat

--
Float like a butterfly, bite like a crocodile.

##### Share on other sites
This is (mostly) correct, and why most computer random number generators are more fully called PSEUDO random number generators. They follow an algorithm and, while possibly very hard to predict, still follow a pattern.

However, there are truly random things. (Your agreement with this will depend, in the end, on philosophy more than mathematics.) Getting the computer to generate truly random numbers involves an outside stimulus.

If you want more info on this sort of thing, check out:

http://www.random.org/

and for a cool way of getting random numbers:

http://lavarand.sgi.com/

---- --- -- -

##### Share on other sites
One example of TRUE randomness is radio-active decay. There is no way to predict when a radio-active neucleus will emmit particles. This is all backed by quantim mechanics.

TRUE Digital randomness dosent exist but for our purposes its probably good enough. And probably better that it isn't really random as it makes for much easier syncronization for multi-player games

Edited by - UraniumRod on 5/1/00 6:01:08 PM

##### Share on other sites
I believe nothing is "truly" random, I think it''s really just theoriticall (spelling). Even when playing with dice - your just manipulating a cube to give you numbers, but they arent really random...

##### Share on other sites
Interestingly, some computers that require truly random numbers often use integrated geiger-counters and count the ticks over a fixed time for their numbers.

Some guys at SGI recently found a cheaper solution, though. They pointed a camera at a lava lamp and used calculations on the resulting images to generate their numbers.

##### Share on other sites
Intel came out with a chip that generates "true" random numbers by measuring something in nature that is random. The generator is in the Pentium III chip.

##### Share on other sites
I guess you could say every number generated was actually determined at the time of the Big Bang. Ok, if you lean the other way, it would''ve been when God said, "Let there..."

Someone would have to issue a:
SysReboot(&this->Universe()); // not recommended

In order to get a different srand() seed.

##### Share on other sites
You could have your program download some current stock market index from the web to send to srand(). Of course, the stock market is chaotic, not random. ~

• 15
• 13
• 35
• 39