This book shows you how to run experiments on your website using A/B testing - and then takes you a huge step further by introducing you to bandit algorithms for website optimization. Author John Myles White shows you how this family of algorithms can help you boost website traffic, convert visitors to customers, and increase many other measures of success. This is the first developer-focused book on bandit algorithms, which have previously only been described in research papers. You'll learn about several simple algorithms you can deploy on your own websites to improve your business including the epsilon-greedy algorithm, the UCB algorithm and a contextual bandit algorithm. All of these algorithms are implemented in easy-to-follow Python code and be quickly adapted to your business's specific needs. You'll also learn about a framework for testing and debugging bandit algorithms using Monte Carlo simulations, a technique originally developed by nuclear physicists during World War II. Monte Carlo techniques allow you to decide whether A/B testing will work for your business needs or whether you need to deploy a more sophisticated bandits algorithm.