Learning to act by integrating mental simulations and physical experiments