We study a population of individuals playing the prisoner’s dilemma game. Individual strategies are invariable but the network of relationships between players is allowed to change over time following simple rules based on the players’ degree of satisfaction. In the long run, cooperators tend to cluster together in order to maintain a high average payoff and to protect themselves from exploiting defectors. We investigated both synchronous and asynchronous network dynamics, observing that asynchronous update leads to more stable states, and is more tolerant to various kinds of perturbations in the system.