How to beat a Bayesian adversary