Learning which simulated actions to take