Live data from Hacker News

Predicting one of 2 characters you will randomly press

github.com

21–25 of 25 posts

Re: Predicting one of 2 characters you will randomly press

#22
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

probably relevant: https://en.wikipedia.org/wiki/De_Bruijn_sequence

edit: dangit, beaten to the punch.

Re: Predicting one of 2 characters you will randomly press

#23
post #17

Earlier quoted context omitted.

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).

Yeah, it uses this style function definition (ES6?) in a few places:

  document.addEventListener("DOMContentLoaded", () => {
Safari doesn't support that.

Re: Predicting one of 2 characters you will randomly press

#24
I did something like this a long time ago in a little competition for beating others' rock paper scissors programs, except I used the other players' moves relative to my own (e.g. my program could catch on to the other player choosing the move that would beat my last move) as well as their current pattern of winning or losing.

Re: Predicting one of 2 characters you will randomly press

#25

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.

Anything There is an inherent 50% probability of each character occurring next. i.e if you were to guess randomly, you would be right 50% of the time given enough trials.
Post reply on HN