Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Examining the code, my first thought was to throw it a de Bruijn sequence[1]: a cyclic sequence of length 2^n that contains every string of length n as a subsequence. It should (and does) learn a length-32 de Bruijn sequence after only a couple of repeats, but performs miserably on a length-64 sequence.

With a little (computer-)elbow grease, one can find a sequence with perfectly free will. After a short time, it starts repeating every... that's right, 64 characters. So of course, we want to find the shortest possible prefix.

  ddddddfdddddffddddfffdddfdfdddff
  ffddfddfdffddffdfddfffffdfdfdfff
  dffdffffffffdffffffdffffddffffff
  dfdfffdffdffffddfffdfdfffdddffff
  ffdffdffffddfdffddffdfddfffdfdfd
  fffdddffdffdfddffddfdffddddfffff
  fdffffddfffdfdfdfffdddfdfdddffdf
  fdfddfddffddfdffddddfdfdfdddfddf
  dddddffffffdffffddfffdfdfffdddff
  dffdfddffddfdffddddfdfdfdddfddfd
  etc.
Note that the last two lines are a de Bruijn sequence. Repeat those until you get bored. That's how you exercise your free will.

There is a deterministic bias: when in doubt, the page guesses "f". If it flipped a coin instead, a few experiments show that the greedy algorithm I and omoikane use cannot beat 25% for long.

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



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: