Learning to Pray