A selfish learner seeks to maximize its own success, disregarding others. When success is measured as payoff in a game played against another learner, mutual selfishness often fails to elicit optimal outcomes. However, learners often operate in populations. Here, we contrast selfish learning among stable pairs of individuals against learning distributed across a population. We consider gradient-based optimization in repeated games like the prisoner's dilemma, which feature multiple Nash equilibria. We find that myopic, selfish learning, when distributed in a population via ephemeral, random encounters, can reverse the dynamics seen in stable pairs and lead to remarkably different outcomes.