How bad are you at generating random numbers?
This is a fun silly game. You input 0s and 1s as random as possible.
Some algorithm tries to guess what you are going to input based on your patterns.
http://seed.ucsd.edu/~mindreader/
It is extremely hard to win without a thought strategy, almost impossible.
And if you want to test a sequence versus two or three word distribution this is a cool tool:
http://www.khanacademy.org/labs/explorations/frequency-stability
9 comments
[ 4.3 ms ] story [ 31.1 ms ] threadIn the past computers where using generators that under some particular tests turned out to be performing really really bad.
var random = [];
var i = 10;
while(i) {
}console.log(random.join());
I was just manually doing the insertions. It lost five out of five times, though the last time only by a very small amount.
It seems also that it generated very often a 1 after a 0 (more than twice as many times than it generates another 0).
Now I got curious, I'll do more tests and look at the documentation for Math.random
Certainly I won't ever use it for any important feature of a website!
EDIT: it seems that with large enough numbers it's not too bad, so I might be able to say more after reading the documentation. At any rate using the strings generated with the khanacademy link I was able to win few times in a row.
I'm curious how this works. I'm guessing that the underlying algorithm is predicting based on a number of different heuristics, measuring the success of each heuristic, and using the prediction from the most successful heuristic up to that point. This can be a successful strategy for a Rock Paper Scissors bot (see: http://stackoverflow.com/a/8827797/173292)
If it's implementing that sort of algorithm under the hood then it isn't necessarily measuring true randomness, as there would certainly be deterministic patterns that could beat it. Anyone have the time to type in the binary representation of the fibonacci sequence?
Not knowing the algorithm I can't be sure, but I guess what it's showing is that we are usually pretty bad at generating numbers, since it's hard, for example, for each person not thinking about it, to keep the same frequency of 3-words as 000, 010, 110, 111 etc...
Your idea of using the Fibonacci series is good. I tried something similar. I tried once implementing the integer series, :-), 0, 1, 10, 11, 100, 101... and I won. Now with that I lose. So maybe the algorithm has been changed to take that into account. I tried other series and I won, but I guess it could also be because it's hard to get any significant pattern in a 100 move game when the series are complicated. It's possible, though, that the same algorithm would win against deterministic patterns if given enough time.
It would be interesting to try with prime numbers as well. It may be easily hard coded as prediction, though.