I've long had a nagging suspicion the universe isn't as random as we are led to believe. I don't attribute it to anything. I don't claim what I see is evidence of a divine plan or the intervention of celestial beings. I just can't shake this feeling the things I see aren't as "random" as they ought to be.
Is that crazy? Maybe. Maybe not. There is no inherent reason the universe must be random, but the idea a person could actually identify non-randomness in it is... difficult to believe. Humans are too prone to biases in how they perceive and remember things to expect them to reliably discern the difference between "random" and "non-random."
I get that. I really do. Still, I can't help but wonder if what I see is really random. For instance, years ago I created a simple program on a graphing calculator to play Rock, Paper Scissors against an computer opponent that would choose its play randomly. I've long since lost the calculator and program, but my win rate was greater than 35% after over 1,500 matches.
What does that mean? I don't know. The results are fairly surprising, but the odds aren't too extreme. Besides, computers cannot produce true randomness (arguably, nothing can). Computers produce "random" numbers via algorithms and calculations, none of which are truly random. It's always possible the human mind might perceive patterns in the "random" numbers chosen by a computer and thus be able to win more often than the odds might suggest.
With that in mind, I decided to test my ability to win at Rock, Paper, Scissors again. I couldn't find a program I liked online so I decided to write one of my own. I copied some Python code I found online, modified/expanded it a bit and started playing. My first test of the code produced these results:
Wins: 37 Losses: 44 Ties: 48
I was happy to see things were working even though a 28.68% win rate did nothing to support the hypothesis I was testing. I was actually happy when I saw those numbers. I'd like to be able to convince myself my previous results with this test were just a fluke of a bad RNG on that calculator I had. It'd make the world seem more sane. This is why I was happy to see the next batch of results:
Current Total Wins: 113 150 Losses: 104 148 Ties: 120 168
About this point I was talking to a friend about how this was probably a waste of time, but it was more enjoyable than losing to seemingly bizarre luck in video games like I had been all night. He told me I'm just seeing what I want to see and I don't have unusual luck. I acknowledged that was possible and said I wanted to keep playing this to try to convince myself he was right. This led to:
Current Total Wins: 118 268 Losses: 105 253 Ties: 102 270
With my win rate having increased from 28.68% to 33.88%, it seemed things were going the way they were supposed to. This batch of results were slightly biased toward winning, but in the long run, everything was averaging out. Then this happened:
Current Total Wins: 74 342 Losses: 72 325 Ties: 55 325
I should point out I can't see a tally of my results as I'm playing. I can't even see how many matches I've played. All I can see is the outcome of each match after I make my selection. That's why the numbers in each run are so uneven. It's also why I was disturbed by these results. A 34.48% win rate isn't huge, but it was somewhat unsettling. I played some more and:
Current Total Wins: 63 405 Losses: 58 383 Ties: 58 383
That the results for losses and ties had lined up like that was entertaining, and I was able to tell myself it was just chance that these results seemed to confirm something was off. I wasn't convinced, but I decided it'd be easy to prove this was just a fluke by playing some more. That's when this happened:
Current Total Wins: 120 525 Losses: 112 495 Ties: 73 456
I'll let what I posted on Twitter explain my reaction:
I got tired of losing at video games tonight so I started playing Rock, Paper Scissors. This is worrying:
— Brandon S? (@Corpus_no_Logos) November 26, 2016
I'm not sure if it's more worrying that I seem to be able to beat Python's RNG or that I've actually played RPS ~1,500 times tonight.
— Brandon S? (@Corpus_no_Logos) November 26, 2016
I took a short break at this point to try to decide how I should feel and if I should keep going. I also did a bit of math. Here's a crude graph I made to show the probability of different numbers of wins, with a (black) line showing the average result and a (red) line showing my results:
As you can see, it's not entirely unreasonable to get results like these. From a statistical perspective, I believe the results were just barely "significant" at the 95% level. This reassured me so I decided to try some more games:
Current Total Wins: 112 637 Losses: 99 594 Ties: 94 550
With my win rate reaching 35.77% over 1,781 runs, the results could easily be described as "statistically significant." In stunned disbelief, I did one more batch:
Current Total Wins: 85 722 Losses: 74 668 Ties: 93 643
Which brought my record to 35.51% over 2,033 runs. I believe the odds of that happening are less than 2%. I know that's not beyond the realm of possibility or anything, but... still. I don't get it.
These results are "statistically significant." Something is probably off. It appears either my luck is unusual or I've learned to beat the default random number generator in Python. And quite quickly at that. It's not like my code is biased. All it uses for this is:
import random num = random.randrange(1,4)
So I don't know what to think right now. Is the randrange function in Python just that predictable? Did my mind just manage to pick up on hidden patterns in two different RNG systems and learn to beat them? Or is this just a fluke? Am I making too much out of what is really nothing?
I don't know. I'd love to hear what you think. In the meantime, I've saving all my test results in timestamped files for documentation purposes. I don't know if I'll do any more though. This is what happened in an attempt I did after getting halfway through writing this post:
Current Total Wins: 76 798 Losses: 52 720 Ties: 75 718
Which puts me up to a 35.69% win rate over 2,236 matches. That can be visualized as:
I'm not sure if I'm doing the math right, but I believe my results are now statistically significant at the 99% level. I'm not sure. I'm not really sure of anything at this moment. I think my only two options at this point are to doubt the laws of probability or make a stiff drink.