> In a class I taught at Berkeley, I did an experiment where I wrote a simple little program that would let people type either “f” or “d” and would predict which key they were going to push next. It’s actually very easy to write a program that will make the right prediction about 70% of the time. Most people don’t really know how to type randomly. They’ll have too many alternations and so on. There will be all sorts of patterns, so you just have to build some sort of probabilistic model. Even a very crude one will do well. I couldn’t even beat my own program, knowing exactly how it worked. I challenged people to try this and the program was getting between 70% and 80% prediction rates. Then, we found one student that the program predicted exactly 50% of the time. We asked him what his secret was and he responded that he “just used his free will.”
I used the digits of pi, transposing and changing the order, and got 14% on the original game. Professional poker players will use external sources of randomness to make sure they’re perfectly balancing their positions and not exploitable.
There's another version where a stats professor divides people into two groups. One group flips a coin 50 times and writes on a whiteboard the results. The other comes up with 50 results.
They leave the room and when they come back immediately know which is which. Specifically because of the over-alternation that yours mentioned. A string of HHHHHH is exactly as likely as HTHTHT, but people don't intuit that.
The strings are equally likely if they're being purely randomly selected, but not if they're being selected by people with a poor understanding of random. In the latter case, people are more likely to select HTHTHT.
I wonder what thought process led you to believe that even though the strings are equally likely and random people who don't choose the one you think is more random have somehow inferior understanding of randomness
The issue the anecdote is reflecting is that across the data of 50 naive made-up coin tosses there are too many alternating sequences and probably zero HHHHHH.
I understand your point, but the context is that repeatedly, experiments have shown that humans inject too much pattern to be good rngs. It turns out that is visible with training after the fact.
Yes, it is possible that any two 50-sequence patterns are actual rng. But some of them are much more likely, and we can tell.
I'm not sure what your point is. A collection of samples were taken from humans, and they did not form a uniform distribution. Samples from an unbiased RNG are much closer to uniform.
Are you saying we should ignore the distribution we observe from humans and predict them as uniform anyway?
You say yourself "strings are equally likely if they're being purely randomly selected". So you move the goalpost to define "random" as "whatever a human would think is random".
> Samples from an unbiased RNG
you mean a PRNG.
> Are you saying we should ignore the distribution we observe from humans and predict them as uniform anyway?
I'm saying the exercise in general is a little pointless, but that's fine.
I have managed to get 38-48% the times I tried. I believe I might have been influenced by the article I just read.
It would be interesting to see if by giving people advice on statics it would produce, on average, a measurably different outcome.
Similar to me, when I have to choose randomly I look for a number anywhere around. If it's odd, one choice, even is the other.
My strategy for rock paper scissors is to always go rock, and tell everyone that's my strategy. It's more fun for me seeing how people deal with that information than the win would be. Not very random though
I don't think Zipf's law gives you this. It mostly says that common words tend to be short, but it doesn't tell you what proportion of the text will be common words. For example, in English writing two-letter words are found much more than one-letter words.
However, I think you're correct anyway. The right distribution to look at is something like the orange series in the bottom graph on [0]. Eyeballing it, it does look like 3/5/7/9/11-letter words appear more in aggregate than those of 2/4/6/8/10 (49% Vs 44.5%), and longer words are a rounding error.
> (...) Then, we found one student that the program predicted exactly 50% of the time. We asked him what his secret was and he responded that he “just used his free will.”
- Scott Aaronson, Quantum Computing Since Democritus.
I found it interesting when I felt my focus shift from the number-generating task to noticing (and responding to) the house’s guesses.
As soon as I noticed it repeating its guess, I had a good long run of adversarially avoiding that number… it’s kind of fun being on the machine side of the slot-machine-type racket!
Yup! Most of the way I put the system together was by having it build several n-gram Markov models of your numerical sequences on the fly.
But we also have a couple of predictors that aren’t markov chains and are based on simpler heuristics. Without seeing your record, I'm guessing that the "numerical avoider" predictor got overweighted and just kept trying to guess the same number.
The first time I did badly. But the second time I got really far by deciding on a number instinctively and then picking something next to it. Maybe we instinctively pick similar numbers, but if we fight our instincts we end up with something truly random.
Alternating and advancing from both ends seems to work, it calls n-1, and n+1 correctly if the previous guess was n, but got no calls in a sequence like - 1, 8, 3, 7, 4, 7, 1, 7, 3, 8, etc
"You spread your picks more evenly than a random draw would. Your most-used number made up 23% of your picks, where a random draw's busiest number gets about 23%."
I have a little "mad-lib templatized" set of sentences for reporting on various stats, and that one was supposed to be sort of related to the law of small numbers. For example, shorter runs mean there is a larger probability of getting lopsided distributions (different from pure 11%).
It's supposed to demonstrate that even though you used a single number a disproportionate number of times, it's not necessarily statistically significant since shorter RNG runs can produce the same effects.
This isn't very interesting, but it scratched an itch I had to see what would happen.
The house's record
The house called 18 of your 190 scored numbers: 9%.
Blind guessing would average about 21.1 of them (11%).
Only 1 of the 206 people in a psychology study was more random than you. The house found you extremely hard to read.
I really want to know who was more random than a RNG
Getting 0% isn't the goal though. You want to sit right at 11.11%, the blind guessing rate. If the prediction algo always predicts you wrong, it actually always "predicts" a number you won't guess. That too is a feat, reducing the pool of numbers you're going to choose from, therefore making you more predictable.
It looks like it's a fair implementation of guessing. Giving it digits of pi gives a very high (low) score - most times. To get a lower score I think you would have to be adversarial and/or get a lucky run. Based on the house doing better/worse on some runs I guess it not deterministic.
The house called 8 of your 76 scored numbers: 11%.
Blind guessing would average about 8.4 of them (11%).
Only 4 of the 206 people in a psychology study were more random than you. The house found you extremely hard to read.
I was. But if you're more random then you're probably not random. I was actively aiming to exploit the game - try to figure out which pattern detector it's keyed on based on its guesses, and then swap to a different pattern. Ended up getting 6% over a decent sample. You could probably get zero with a bit of luck!
The problem I had was somehow the double-pick algo randomly clicking on at seemingly illogical times. I'm guessing that maybe it's something like if you're not hitting any pattern matcher then the next guess uses a random pattern guesser, because it nailed me multiple times with the doubles even after not having one in 10-20 numbers prior. Though maybe that is itself a pattern that it checks for? It wasn't mentioned in the docs.
What about the following strategy? You try to select a random number between 0 and 1 in your head, then decide randomly to keep or change the number you selected. This strategy could make your selection more random if your decisions are independent of the numbers
themselves. Perhaps someone could try and report results.
Imagine that instead of two numbers you select a million numbers, and apply a zip algorithm to that sequence to obtain a file then you map the first byte of that file using (first byte) mod 9 + 1, intuitively there must not exist any correlation between consecutive tries of this strategy. Looking for this example I realized that instead of using n1+n2 you should use a non commutative operation to improve the strategy, but when using just two numbers the addition suffices.
The essence of von Neumann's trick is that all permutations of independent events have the same probability. So the trick generalizes to any other set of possible results.
I just pretended I'm playing piano to a megamix of tracks which popped into my head and did 'well'. Only 2 people more random. Typing though, think the site said that's "easier to win" on. Cba to speak 200 numbers out loud :/
Haha, that’s great. Yeah, I totally get what you mean about speaking out loud.
You only really need to vocalize about ~40 numbers total, but you can actually get a similar level of RNG by "subvocalizing the numbers" before you press them on the keypad.
The main issue is that using the keypad kind of lends itself to just pressing it randomly without really thinking about the actual numbers themselves.
This is pretty interesting. I've found it's fun to throw off the algorithm. Use your warmup to repeatedly guess the same number, and then don't use it for a while.
I only have a few digits of pi memorized, so I had better luck using digits from fibonacci's sequence. I can derive them in my head, albeit slowly as the numbers get large.
> The house called 1 of your 32 scored numbers: 3%. Blind guessing would average about 3.6 of them (11%). Only 1 of the 206 people in a psychology study was more random than you. The house found you extremely hard to read.
The house called 9 of your 117 scored numbers: 8%.
Blind guessing would average about 13.0 of them (11%).
None of the 206 people in a psychology study were more random than you. The house found you extremely hard to read.
OP here - I went with Vosk because it's pretty trivial to lock input down to a set vocabulary (in this case numbers) and from my testing works relatively well on most browsers. (webkit, firefox, etc)
Thanks for the suggestion - I've been looking yadsnap over but it seems like the ONNX model for english is significantly larger than the one used by vosk (30mb versus 150mb) so that would be my only hesitation to use it.
Maybe there's a way to shrink it down given I only need to support a limited vocabulary domain...
127 comments
[ 2.0 ms ] story [ 65.2 ms ] thread(Yes, I saw the "type the numbers" option.)
> In a class I taught at Berkeley, I did an experiment where I wrote a simple little program that would let people type either “f” or “d” and would predict which key they were going to push next. It’s actually very easy to write a program that will make the right prediction about 70% of the time. Most people don’t really know how to type randomly. They’ll have too many alternations and so on. There will be all sorts of patterns, so you just have to build some sort of probabilistic model. Even a very crude one will do well. I couldn’t even beat my own program, knowing exactly how it worked. I challenged people to try this and the program was getting between 70% and 80% prediction rates. Then, we found one student that the program predicted exactly 50% of the time. We asked him what his secret was and he responded that he “just used his free will.”
They leave the room and when they come back immediately know which is which. Specifically because of the over-alternation that yours mentioned. A string of HHHHHH is exactly as likely as HTHTHT, but people don't intuit that.
this contradicts the comment you're replying to. the premise they are having is that HTHTHT is "less random" than HHHHHH.
Yes, it is possible that any two 50-sequence patterns are actual rng. But some of them are much more likely, and we can tell.
Yeah if you define randomness as stuff humans subjectively can't predict then sure...
Are you saying we should ignore the distribution we observe from humans and predict them as uniform anyway?
> Samples from an unbiased RNG
you mean a PRNG.
> Are you saying we should ignore the distribution we observe from humans and predict them as uniform anyway?
I'm saying the exercise in general is a little pointless, but that's fine.
https://aaronsonoracle.com/
The secret? I distracted myself with the website text and kept pressing the buttons quickly without thinking about it.
This is what I also use for rock, paper scissors (mod 3). You can also use second hand of a watch for random samples, e.g splitting 0-30 vs. 31-60.
My strategy for rock paper scissors is to always go rock, and tell everyone that's my strategy. It's more fun for me seeing how people deal with that information than the win would be. Not very random though
However, I think you're correct anyway. The right distribution to look at is something like the orange series in the bottom graph on [0]. Eyeballing it, it does look like 3/5/7/9/11-letter words appear more in aggregate than those of 2/4/6/8/10 (49% Vs 44.5%), and longer words are a rounding error.
[0] https://medium.com/@davidxu90/relative-frequencies-of-words-...
- Scott Aaronson, Quantum Computing Since Democritus.
I actually built this on a whim after watching that episode of TNG where Data locks everyone out of the Enterprise.
https://youtube.com/watch?v=rERApU26PcA
https://youtu.be/bl5TUw7sUBs
(archived now): https://web.archive.org/web/20260625105410/https://brainfrog...
And it inspired me to build a little game based on it. See if AI can read you mind: https://jeffyclassify.com/blog/mind-reader/
As soon as I noticed it repeating its guess, I had a good long run of adversarially avoiding that number… it’s kind of fun being on the machine side of the slot-machine-type racket!
Did I break it?
But we also have a couple of predictors that aren’t markov chains and are based on simpler heuristics. Without seeing your record, I'm guessing that the "numerical avoider" predictor got overweighted and just kept trying to guess the same number.
It should be fixed now!
??? huh?
I have a little "mad-lib templatized" set of sentences for reporting on various stats, and that one was supposed to be sort of related to the law of small numbers. For example, shorter runs mean there is a larger probability of getting lopsided distributions (different from pure 11%).
It's supposed to demonstrate that even though you used a single number a disproportionate number of times, it's not necessarily statistically significant since shorter RNG runs can produce the same effects.
tldr; "im just like totally so random xD"
The problem I had was somehow the double-pick algo randomly clicking on at seemingly illogical times. I'm guessing that maybe it's something like if you're not hitting any pattern matcher then the next guess uses a random pattern guesser, because it nailed me multiple times with the doubles even after not having one in 10-20 numbers prior. Though maybe that is itself a pattern that it checks for? It wasn't mentioned in the docs.
HT => 0
TH => 1
HH => discard
TT => discard
It's pretty surprising at first, but this leads to a perfectly random and balanced distribution of 0s and 1s.
Thanks, btw, actually enjoyed that. :)
You only really need to vocalize about ~40 numbers total, but you can actually get a similar level of RNG by "subvocalizing the numbers" before you press them on the keypad.
The main issue is that using the keypad kind of lends itself to just pressing it randomly without really thinking about the actual numbers themselves.
I always thought I was random, but now it's conclusive!
https://imgur.com/a/0azWegW
I started just lagging the guesses of the machine, and it never seemed to catch on.
"Over here we have our random number generator."
https://web.archive.org/web/20230305130159im_/https://assets...
I tried it. Several 9s later, it figured me out.
Nice!
Not familiar with the sota if someone can chime in.
https://github.com/alphacep/vosk-api
Maybe there's a way to shrink it down given I only need to support a limited vocabulary domain...