We report on an experiment in which subjects older than 55 years old and subjects younger than 26 years old play repeatedly 4 versions of the centipede game. For each game we define four treatments that allow us to study cooperation and belief formation of these two age groups. We find that beliefs about the others' age group shape the outcome: while seniors are cooperative and generous with juniors when they incur lower opportunity costs, for juniors it is when playing with seniors that they learn the way to the theoretical solution by smoothly decreasing their cooperation levels