I was winning after about 60 moves but then got bored and made too long of a string of consecutive ones and the computer caught up. This would be a much better game if I could play it with the keyboard, as I was having difficulty clicking accurately with my mouse (going very fast).
Indeed, this implementation let you cheat: while the program tries to learn your behavior, you can learn the program's and outguess it. The random sequence should be provided blindly, and the program should process it a posteriori, for the subtitle to be relevant.