Generative models of vision and action