by mdp on 3/8/19, 11:48 AM with 150 comments
by svat on 3/8/19, 5:33 PM
> Révész in [Strong theorems on coin tossing] tells the following amusing story attributed to T. Varga: “A class of high school children is divided into two sections. In one of the sections, each child is given a coin which he throws two hundred times, recording the resulting head-and-tail sequence on a piece of paper. In the other section, the children do not receive coins, but are told instead that they should try to write down a ‘random’ head-and-tail sequence of length two hundred. Collecting these slips of paper, [a statistician] then tries to subdivide them into their original groups. Most of the time, he succeeds quite well.”
> The statistician’s secret is [...] in a randomly produced sequence of length 200, there are usually runs of length 6 or more: the probability of the event turns out to be close to 97%. On the other hand most children (and adults) are usually afraid of writing down runs longer than 4 or 5 as this is felt as strongly “non-random”. The statistician simply selects the slips that contain runs of length 6 or more as the true random ones. Voilà!
----
Obviously, the way to beat this site (or the above classroom trick) would be to use "true" random numbers. But if one doesn't have access to coins or computers, it raises the question: what is a good way to generate a long sequence of reasonably random coin flips in one's head? For example, if you've memorized many digits of pi or e or some such "believed to be normal" constant, you could use whether each digit is odd or even (or maybe even something like throw away 8 and 9, and read each remaining digit in octal to get 3 random bits). But that only gets you so far...
by andrewla on 3/8/19, 2:33 PM
Ah, should have read more carefully -- it's using 5-grams as the base, not as the model, so really it's 6-grams, so we need B(2,6). We can try 0000001000011000101000111001001011001101001111010101110110111111
by crdrost on 3/8/19, 3:57 PM
The basis for this is that you will likely spend maybe 30-60s playing this game so you will register something between 100-200 keypresses or so. If you just click the "Randomize" button you can see the problem: a truly random input source will fluctuate over 100-200 keypresses much more than it will be biased upwards, so that after 100-200 you will probably see some run of "bad luck" by which the truly-random algorithm crashes from $1005 to $995 or so. Now if this were you, you would have stopped there with the last 5-10% being predicted perfectly, and said "okay, okay, the algorithm has learned how I behave." But it hasn't.\
Part of this is the fallacy that people generally assume that over a large number of trials the standard deviation of a sum of random variables drops to zero -- that is true of an average but not a sum. So you have a discrete random variable which takes on the values +1.05 with probability 0.5 or -1 with probability 0.5, so its variance is basically 1.0 (off by 625 ppm but whatever) and so its standard deviation is basically 1.0 and if you sum N of these you have a standard deviation that is 1.0 √N while the mean is 0.05 N, these only equal when √N = 1.0/0.05 = 20 and thus N=400.
So at 100-200 trials, you cannot generally expect the systematic bias from winning extra money when you are random to visibly outweigh the random noise from just randomly being wrong, you have to go to 500+ trials to really prove your mettle. But most people just won't play this thing for that long.
by Radle on 3/8/19, 2:54 PM
The program only guessed 49% of my inputs right over 100 Iterations.
When I understood it's only two keys the program guessed correct 60% of the time.
by umvi on 3/8/19, 2:35 PM
Useful for generating random rocks paper scissors moves, or in this case, random directions (odd = right, even = left)
by kkwteh on 3/8/19, 2:53 PM
For instance, if you input RLLRRLLLLRLLRRRLLRLLLLLLRRLRLRLLLRRRRLRRRRRRLLLRLRLRRLRRLLRRLLLRRLRRLRLLRLRRRLRLRLLLRLLRLLLLLRLRLRRR it only guesses right 34% of the time.
https://gist.github.com/kkwteh/b81d8e599ec46a2d64b096f953a11...
by laumars on 3/8/19, 2:13 PM
https://i.imgur.com/O3EggFY.png (0% guessed right after 15 key presses)
Here's the sequence I used. I'd be interested if this works for other people too:
1: right
2: right
3: right
4: right
5: right
6: right
7: left
8: right
9: right
10: right
11: left
12: right
13: left
14: right
15: left
by __david__ on 3/8/19, 3:41 PM
by murbard2 on 3/8/19, 4:17 PM
by jawns on 3/8/19, 2:21 PM
By the way, within those first 100 digits, there are multiple occurrences of even or odd sequences that go past the 5-gram level.
Within the first 1000 digits of pi, there is one 11-digit sequence of odd numbers, which you will lose money on.
by bcaa7f3a8bbc on 3/8/19, 2:03 PM
$ python3
>>> # not using os.urandom to save a import...
>>> rng = open("/dev/urandom", "rb")
>>> "{0:08b}".format(rng.read(1)[0])
And act accordingly, soon the correct rate approaches 50% as expected.by OisinMoran on 3/8/19, 4:24 PM
[0] http://people.ischool.berkeley.edu/~nick/aaronson-oracle/
by RegBarclay on 3/8/19, 4:47 PM
by irrational on 3/8/19, 6:54 PM
by nullandvoid on 3/8/19, 2:27 PM
by lucb1e on 3/8/19, 11:06 PM
I'm happy to participate in such statistics so I don't need that HTML file, but I'm not okay with sending it to some third party that then tracks a whole lot of other things as well. So Google Analytics is blocked as always; I'm sorry that I couldn't submit my 52% score...
by jrochkind1 on 3/9/19, 1:22 AM
I tried using an actual random number generator to generate inputs, just to verify with my eyes that, as expected, the computers guess rate hovered around 50%, and didn't get more than 5% off usually. (I realize it _could_).
I tried picking a 'random' (knowing surely I'll still have unconcious patterns) number 1-5, and then doing that many lefts, pick another number, that many rights.
That got me a really good percentage (computer was only around 30% right) up to ~40 or so iterations. But didn't last, eventually it got to around 50% or so as usual, and then I started to lose.
It would be interesting, if knowing the algorithm the guesser is using, if you could devise an algorithm to defeat it, and "win" lots of money from the "bank". I mean, I guess, the obvious thing to do, if you had the algorithm the guesser was using, you could just run it on your own past input, and then always pick next whatever the opposite of what it would pick is. It seems like that would have to work, and that it couldn't possibly work, heh. This becomes an interesting illustration of... something or other computer science-wise, it reminds me of Godel Escher Bach or something.
What this whole thing makes me think of is surveillance. Say, in an old detective thing, trying to "lose a tail" by making "random" turns. In our society of increasingly universal surveillance, _plus_ computers analyzing the data (and you don't know the exact algorithms being used)... there's probably no way to "lose the tail".
by DJBunnies on 3/8/19, 2:49 PM
by florian_s on 3/8/19, 3:05 PM
let left = () => captureBtnLeftFunc($.Event())
let right = () => captureBtnRightFunc($.Event())
() => captureBtnRightFunc($.Event())
setInterval(() => {
console.log("Guessing");
if (Math.random() < 0.5) {
left()
} else {
right()
}
}, 1000)
by teddyh on 3/8/19, 3:43 PM
by mark-r on 3/8/19, 10:52 PM
by snowsilence on 3/9/19, 5:42 AM
Both cite that same "Aaronson Oracle" as the source inspiration.
by wool_gather on 3/9/19, 6:23 PM
The interesting part was this: I had the script just run a loop with a short delay between outputs. I started with a little under a second, and my brain/fingers kept trying to anticipate the next element. Often incorrectly, making my input predictable by the site. My fingers were just twitching to press a key.
In order to "win", I had to set the delay to 1.2 seconds, physically lift my fingers off the keyboard, and spend a little bit of effort reading each choice to make sure that I was actually following the real random instructions.
My brain just struggled to cope with the lack of pattern.
by grawprog on 3/8/19, 5:13 PM
by trypt on 3/9/19, 11:28 AM
A person good at mental arithmetic could memorize a small-state PRNG and get good results but I couldn't personally do this. I wonder if this has any strategic advantages in any areas of life. Maybe poker?
by iheartpotatoes on 3/8/19, 8:20 PM
by elihu on 3/9/19, 12:06 AM
by wwweston on 3/8/19, 6:44 PM
Flaw in my plan: I don't know if the word length distribution for most english texts (much less a given writer) is biased.
by Luc on 3/8/19, 2:37 PM
by macintux on 3/8/19, 2:20 PM
by jvanderbot on 3/8/19, 11:40 PM
e.g. L,R,LL,RR,LLL,RRR, and if it starts guessing right enough, reset or reverse.
Then, it ends up being closed loop two armed bandit ...
by DjGilcrease on 3/8/19, 9:41 PM
by ZoltanAK on 3/8/19, 1:56 PM
by friendly_chap on 3/8/19, 2:30 PM
It's harder than I expected...
by JohnFen on 3/8/19, 5:50 PM
by BasDirks on 3/8/19, 6:02 PM
by driftonhedgehog on 3/8/19, 11:07 PM
by expopinions on 3/8/19, 5:27 PM
Let's take a simple example: you had an important meeting at 9 am but since you were stuck in traffic, you were late by 10 mins.
The final outcome can be clearly explained by actions that directly or indirectly led to them. May be there was an accident causing the traffic jam. May be you woke up 10 mins late than usual thereby getting caught in rush hour traffic. May be the cab you took to work, arrived late at your destination cause he woke up late.
All of the above are totally controllable actions, albeit not in your direct control. Hence the feeling that life is random. Because none of us have any control over the outcomes of the actions of others, who subtly influence our lives on a daily basis.
Think of it this way: our life is intertwined with the lives of others in one way or the other. From the cab driver who drives us to work to our loved ones who shatter our hearts, their actions influence us, some more than the others, but influence us nonetheless.
It's a complex equation, with a whole lot of variables, most of which are beyond our control and unknown and the solution to this equation is the outcome of an event.
I believe that if one knew the values to all the variables at any given point of time, then one would be able to solve the equation with precision
by caiocaiocaio on 3/8/19, 2:04 PM
by mocsabnimajneb on 3/8/19, 7:34 PM