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 would have easily won that game (and maybe made a quip about free will when asked how...). All you need is some memorized secret randomness. For example, a randomly generated password that you’ve memorized, but you’d have to figure out how to convert it to bits on the fly.
Personally I’d recommend going to random.org, generating a few hexadecimal bytes (which are pretty easy to convert to both bits and numbers in any desired range), memorizing them, and keeping them secret. Then you’ll always be able to act unpredictably.
Well, unpredictably to a computer program. If you want to be able to be unpredictable to someone who’s good at reading your next move from your face, you would need some way to not know your next move before making it. One way would be to run something like an algorithm that generates the binary expansion of pi in your head, and delaying calculating the next bit until the best moment. Of course, you wouldn’t actually choose pi, but something less well-known and preferably easier to calculate. I don’t know any such algorithms, and I guess if anyone knows a good one, they’re not likely to share. But if it was something like a pseudorandom bitstream generator that takes a seed, it could be shared, as long as you didn’t share your seed. If anyone’s thought about this in more depth and is willing to share, I’m interested.
When I need this I just look at the nearest object. If the first letter is between a and m, that’s a 0. If it’s between n and z, that’s a 1. For larger strings of random bits, take a piece of memorized text (like a song you like) and do this with the first letter of each word.
Seconds are even? Type ‘f’. Odd? Type ‘d’. (Or vice-versa. Or use minutes, if you don’t have to do this very often.)
A while ago there was an article (in NYTimes online, I think) about a program that could beat anyone in Rock-Paper-Scissors. That is, it would take a few iterations, and learn your pattern, and do better than chance against you.
It never got any better than chance against me, because I just used the current time as a PRNG.
Over 12 rounds against the veteran computer, I managed 5-4-3, just trying to play “counterintuitively” and play differently from how I expected the players whose information it aggregated would play.
Not enough repetitions to be highly confident that I could beat the computer in the long term, but I stopped because trying to be that counterintuitive is a pain.
Got 7-6-7 with the same tactic. Apparently the computer only looks at the last 4 throws, so as long as you’re playing against Veteran (where your own rounds will be lost in the noise), it should be possible for a human to learn “anti-anti-patterns” and do better than chance.
19-18-13 over 50 rounds against the veteran, without using any external RNG, by looking away and thinking of something else so that I couldn’t remember the results of previous rounds. (My after-lunch drowsiness probably helped.)
Somehow managed 16-8-5 versus the veteran computer, by using the articles own text as a seed “Computers mimic human reasoning by building on simple rules...” and applying a-h = rock, i-p = paper, q-z = scissors, I think this is the technique I will use against humans (I know a few people I would love to see flail against pseudo-randomness).
That should fail in the long run because it’s unlikely that the frequency of letters in English divides so evenly that those rules make each choice converge to happening exactly 1⁄3 of the time.
I’d just generate the random numbers in my head. A useful thing to do is to pick a couple of numbers from thin air (which doesn’t work by itself because the human mind isn’t good at picking ‘random’ numbers from thin air), then adding them together and then taking the last digit (or if you wantt 3 choices, taking them mod 3).
That’ll be almost independent but not unbiased: I think that a-m will be more frequent than n-z. However, you could do the von Neumann trick: if you have an unfair coin and want a fair sequence of bits, take the first and second flips. HT is 0, TH is 1, and if you get HH or TT, check the third and fourth flips. Etc.
I just looked up the letter frequencies and it’s 52% for a-m and 48% for n-z (for the initial letters of English words). Using ‘l’ instead of ‘m’ gives a 47⁄53 split, so ‘m’ is at least the best letter to use.
There once was some site that let you enter a sequence of “H” and “T” and test it for non-randomness (e.g. the distribution of the length of runs, the number of alternations, etc.), and after a couple attempts I managed to pass all or almost all the tests a few times in a row.
-- Scott Aaronson
Holy Belldandy, it sounds like someone located the player character. Everyone get your quests ready!
Woah, I’d better implement Phase One of my evil plan if it’s going to be ready in time for the hero to encounter it.
Omg, what do I do?! I can’t find my random encounter table!
Just act life-like!
Don’t worry, you are the random encounter.
And rewards.
???
Someone located his inner d2!
My bet is that the student had many digits of pi memorised and just used their parity.
I would have easily won that game (and maybe made a quip about free will when asked how...). All you need is some memorized secret randomness. For example, a randomly generated password that you’ve memorized, but you’d have to figure out how to convert it to bits on the fly.
Personally I’d recommend going to random.org, generating a few hexadecimal bytes (which are pretty easy to convert to both bits and numbers in any desired range), memorizing them, and keeping them secret. Then you’ll always be able to act unpredictably.
Well, unpredictably to a computer program. If you want to be able to be unpredictable to someone who’s good at reading your next move from your face, you would need some way to not know your next move before making it. One way would be to run something like an algorithm that generates the binary expansion of pi in your head, and delaying calculating the next bit until the best moment. Of course, you wouldn’t actually choose pi, but something less well-known and preferably easier to calculate. I don’t know any such algorithms, and I guess if anyone knows a good one, they’re not likely to share. But if it was something like a pseudorandom bitstream generator that takes a seed, it could be shared, as long as you didn’t share your seed. If anyone’s thought about this in more depth and is willing to share, I’m interested.
http://blog.yunwilliamyu.net/2011/08/14/mindhack-mental-math-pseudo-random-number-generators/
That’s awesome, thanks.
Awesome. I tried doing that when I was a child but naturally failed.
When I need this I just look at the nearest object. If the first letter is between a and m, that’s a 0. If it’s between n and z, that’s a 1. For larger strings of random bits, take a piece of memorized text (like a song you like) and do this with the first letter of each word.
There’s an easier way: look at the time.
Seconds are even? Type ‘f’. Odd? Type ‘d’. (Or vice-versa. Or use minutes, if you don’t have to do this very often.)
A while ago there was an article (in NYTimes online, I think) about a program that could beat anyone in Rock-Paper-Scissors. That is, it would take a few iterations, and learn your pattern, and do better than chance against you.
It never got any better than chance against me, because I just used the current time as a PRNG.
Edit: Found it. http://www.nytimes.com/interactive/science/rock-paper-scissors.html?_r=0
Edit2: Over 25 rounds, 12-6-7 (win-loss-tie) vs. the “veteran” computer. Try it and post your results! :)
Over 12 rounds against the veteran computer, I managed 5-4-3, just trying to play “counterintuitively” and play differently from how I expected the players whose information it aggregated would play.
Not enough repetitions to be highly confident that I could beat the computer in the long term, but I stopped because trying to be that counterintuitive is a pain.
Got 7-6-7 with the same tactic. Apparently the computer only looks at the last 4 throws, so as long as you’re playing against Veteran (where your own rounds will be lost in the noise), it should be possible for a human to learn “anti-anti-patterns” and do better than chance.
14-11-14 over 39 rounds using gwern’s linked prng (p=69, m=6, seed=minutes+seconds). Yet another cool trick to impress psychology professors!
I got 8-9-7 over 25 rounds (which seems approximately as good as chance) while trying to be smart (and not using any source of randomness).
Edit: I guess this was actually 24 rounds.
19-18-13 over 50 rounds against the veteran, without using any external RNG, by looking away and thinking of something else so that I couldn’t remember the results of previous rounds. (My after-lunch drowsiness probably helped.)
10-5-10 against veteran by trying to predict the computer and occasionally changing levels of recursion.
Second try: 14-16-15 by trying to act randomly (without conciously using an algorithm).
9-6-10 here out of 25 rounds, using current time. :(
I remember doing way better than this a few months ago, just by playing naturally. Gonna blame sample size...
Somehow managed 16-8-5 versus the veteran computer, by using the articles own text as a seed “Computers mimic human reasoning by building on simple rules...” and applying a-h = rock, i-p = paper, q-z = scissors, I think this is the technique I will use against humans (I know a few people I would love to see flail against pseudo-randomness).
That should fail in the long run because it’s unlikely that the frequency of letters in English divides so evenly that those rules make each choice converge to happening exactly 1⁄3 of the time.
I’d just generate the random numbers in my head. A useful thing to do is to pick a couple of numbers from thin air (which doesn’t work by itself because the human mind isn’t good at picking ‘random’ numbers from thin air), then adding them together and then taking the last digit (or if you wantt 3 choices, taking them mod 3).
9-6-10 here out of 25 rounds, using current time. :(
That’ll be almost independent but not unbiased: I think that a-m will be more frequent than n-z. However, you could do the von Neumann trick: if you have an unfair coin and want a fair sequence of bits, take the first and second flips. HT is 0, TH is 1, and if you get HH or TT, check the third and fourth flips. Etc.
I just looked up the letter frequencies and it’s 52% for a-m and 48% for n-z (for the initial letters of English words). Using ‘l’ instead of ‘m’ gives a 47⁄53 split, so ‘m’ is at least the best letter to use.
[Aside] When do you need to generate random numbers in your head? I can think of literally no time when I’ve needed to.
If you have to make a close decision and don’t have a coin to flip. Or at a poker tournament if you don’t trust your own ability to be unpredictable.
There once was some site that let you enter a sequence of “H” and “T” and test it for non-randomness (e.g. the distribution of the length of runs, the number of alternations, etc.), and after a couple attempts I managed to pass all or almost all the tests a few times in a row.