If you haven't read "The Signal and the Noise" by Nate Silver, I would highly suggest doing so. In Chapter 11 of his book entitled "If You Can't Beat 'Em...", he discusses the futility of beating the stock market in the long run. To emphasize his point, he mentions that strategies to beat the stock market in the long run "resemble a high-stakes game of rock-paper-scissors at best." Reading this reminded me of an old probability class I took because the Professor hosted a link to a Roshambo bot. The Professor challenged any student to beat the bot in the long run, but the best outcome you could expect was a draw - a third of the games were wins, a third were ties, and the bot was victorious for the last third. This expectation is exactly why Silver compared this children's game to beating the stock market in the long run, but what are the mechanisms at play that give the bot an advantage?
This project hopes to shine some light on these mechanisms in a thorough manner. I decided to reproduce my Professor's bot but add more features to let you peek under the mathematical hood. Here is how you can learn more:
- Go to my GitHub page, clone the repo, and start play against some of the bots. Which ones are easier/harder to beat?
- Try facing the bots off against one another. Which are stronger/weaker?
- Come up with a couple of sequences and test them against every bot. Which bot performs best against your sequence?
- Take the results files from all of your tests above and make sure that you don't mistake the noise (a single game in which a weak bot is victorious over a strong one) for the signal (you can't beat the strongest bot in the long run).
- Read on to learn more about Bayes Theorem and the math at play in this program
A good introduction to this section regardless of how familiar you are with Bayes Theorem is to watch 3Blue1Brown's video and Veritasium's video. Both do an excellent job of reining in the math to tangible examples. Here is the formula restated:
Your likelihood models can be as thorough as you like. You can build a model that only considers one step into the past, multiple steps into the past, or even a model that also considers the outcome of the game or the choices you made in estimating the probability of R, P, or S. The following example will just consider the case of one step into the past.