Saturday, September 20, 2014

Truly Random

There's a bit of a disagreement on whether true randomness exists but instead of going straight into what is randomness I'll have to take a round about path by starting with what people believe.

According to this youtube video: http://www.youtube.com/watch?v=dmX1W5umC1c science has determined that quantum physics is truly random ie it can never be predicted with certainty. I'll assume this is a true statement (ie science believes this). But Einstein isn't alone in his thoughts that "God does not roll dice", that is to say he is not alone in the theory that with enough data anything can be predicted with certainty so I'll group people based on this matter.

  1. People who believe in a god that knows the future with certainty and said god is the cause of all things. Do they believe truly random exists? No because god caused it, it isn't random.
  2. People who know quantum physics (and are not in group #1). Do they believe truly random exists? Yes because quantum stuff is truly random.
  3. Everyone else. Do they believe truly random exists? Maybe but probably not. General, simple science is calculated as though everything could be determined and that is how most people live their lives however some people also recognize things they can't explain and are therefore not sure if truly random exists.

But what defines truly random? A truly random event has an outcome (or occurrence) that can never be predicted. So obviously if god can predict it then it isn't truly random. However the common usage of the word random does not refer to truly random. For example: rolling a standard 6 sided die is considered random but it isn't truly random. Based on the initial spin, height, friction of table, air etc the die has only 1 possible outcome which could be calculated with certainty if a computer was given enough data and time to calculate it.

But if a 6 sided die is determined then why is it considered random at all? The common usage of the word random is referring to human observable random. Just like how truly random can never be predicted by anyone, human observable random is instead that it can't reasonably be predicted by humans. So, for example, a roulette wheel can't easily be calculated by a human to predict the outcome with certainty but a computer can (but only after it has been cast before it lands). This is where gambling comes in: "what do you think it will land on?" and also where cheating comes in: "what does the computer say it will land on?". To be more accurate I don't think computers are perfect at roulette it's just that they are so much better than a human that if you use one you'll get into big trouble.

Now there's also computers that generate random numbers based on an algorithm and a seed. Computers are completely deterministic: given the same seed will always give you the same answer. So then why is this considered random? Two reasons: 1) the algorithm used is hard to find and even if you do find it, it is hard to calculate by hand and 2) the same seed is never used again. The most obvious seed is the current time in milliseconds. Now this is not truly random and it is not always computer observable random however it is human observable random (and is therefore random via the common usage of the word). As a shout out to Java: java.util.Random uses the current time in nanoseconds as a seed making it impossible for a computer to cheat.

So what's with all the hate for random number generators? The first problem is that the average person doesn't know the difference between random and truly random and knowing that a computer is using a determined algorithm assumes that the results could be predicted by a human (which it can't) and is therefore unacceptable. The second problem is that not all random number generators are created equal: some older ones suck. I talked with a person who was playing Final Fantasy 1 (GBA remake) and the random number generator got stuck before he saved so that no matter what he did he met unavoidable death and had to start a new game. I've also heard that there was an old game (NES?) that didn't use time as the seed and was not hard for a human to calculate the entire battle ahead of time. Fortunately modern, well built random number generators don't have such problems and are safe and reliable. The third problem is that humans can't naturally understand statistics and sometimes make false claims (this is why we need education).

But I went off on a tangent. So is there such thing as random? Yes. Is there such thing as truly random? That depends on what you believe. So next time you say "lol I'm so random" I'll know what you really mean is "I act in a way that makes it difficult for other people to predict my actions."