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.