Learning and evolution of altruistic preferences in the Centipede game