The brain as a generative model: information-theoretic surprise in learning and action