Thompson Sampling: Predicting Behavior in Games and Markets