I didn't review the patch, but that is the expected result. That sequence will cause it to think that whatever previous 5 pattern it saw, your next is equally likely to be 1 or 0. So it will guess randomly, and half the time it is right.
However with $1 vs $1.05 returns, you'll steadily make money.
Is there an error in my patch ?