Economic games such as the public goods game are increasingly being used to measure social behaviours in humans and non-human primates. The results of such games have been used to argue that people are pro-social, and that humans are uniquely altruistic, willingly sacrificing their own welfare in order to benefit others. However, an alternative explanation for the empirical observations is that individuals are mistaken, but learn, during the game, how to improve their personal payoff. We test between these competing hypotheses, by comparing the explanatory power of different behavioural rules, in public goods games, where individuals are given different amounts of information. We find: (i) that individual behaviour is best explained by a learning rule that is trying to maximize personal income; (ii) that conditional cooperation disappears when the consequences of cooperation are made clearer; and (iii) that social preferences, if they exist, are more anti-social than pro-social.