Learning to be happy