Live data from Hacker News

Predicting one of 2 characters you will randomly press

github.com

11–20 of 25 posts

Re: Predicting one of 2 characters you will randomly press

#11

For me it is pretty consistently 50% +/- 5 even after a minute. It doesn't seem to work well if you repeat the same key a lot (i.e don't flip to often).

I got 52% after a good lot of keypresses (not sure exactly how many). I chose to not look at the screen at all during that time - I think that probably helps.

Mine started at 25% and worked it's way up to 54%. Which also involved me holding down keys for a few seconds. I'm not sure if it works or if Hacker New's user base is skewed towards people who are slightly better at being random. (or if that's cause by self reporting, would someone whose best was 80% want to come forward?)

Edit: Interesting tidbit: I pre-seeded at 100% by holding down F and it trended down to ~68% before I decided I shouldn't spend too much time on this. Maybe we didn't use it long enough?

Re: Predicting one of 2 characters you will randomly press

#12

For me it is pretty consistently 50% +/- 5 even after a minute. It doesn't seem to work well if you repeat the same key a lot (i.e don't flip to often).

This is actually due to a psychological thing where humans don't find long strings of repeated letters/digits "random" and hence will flip more frequently than you'd expect from a machine. I also recall there being a problem in the use of 5-grams which lead to a sequence in which it guessed 0%, but I'm struggling to find it now.

If you would find the sequence I describe in my other comment, I think you would almost get that result, because you would (except at the beginning of the sequence) always pick the k-gram that has been seen one time less.

Re: Predicting one of 2 characters you will randomly press

#13
post #8

Is there, for a given k, an easy to remember sequence (easy to remember algorithm with little state) that has all the k-grams with the same frequency? For k=1: 01 repeating For k=2: 0011 repeating For k=3: 00010111 repeating

They're called De Bruijn sequences[1], and there's an algorithm for constructing them. I'm not sure how easy it is to run in your head, though.

[1] https://en.wikipedia.org/wiki/De_Bruijn_sequence#Algorithm

Re: Predicting one of 2 characters you will randomly press

#15

So, I tried a simple python one-liner: [os.urandom(1)[0] and typed 'd' for True and 'f' for False in the array, bringing the accuracy of the predictor down to 53%. Theoretically, I'm guessing doing it for large enough numbers should make it exactly 50%.

If it doesn't come down to 50% for sufficiently large numbers, you've found a break in your OS's urandom and someone is about to be famous!

Re: Predicting one of 2 characters you will randomly press

#17
post #3

Earlier quoted context omitted.

I'm on OS X with Firefox 47.0.1 and it doesn't work for me either :(

I'm on OS X with Firefox 47.0.1 and it works fine. It doesn't display anything until the 6th keypress.

Doesn't work in Safari for me, but it does work in Chrome (after pressing keys six times).

Re: Predicting one of 2 characters you will randomly press

#20

For me it is pretty consistently 50% +/- 5 even after a minute. It doesn't seem to work well if you repeat the same key a lot (i.e don't flip to often).

I got 52% after a good lot of keypresses (not sure exactly how many). I chose to not look at the screen at all during that time - I think that probably helps.

got it down to 50% but then started learning or I started focusing, it went as up as 56% before I got bored
Post reply on HN