A bad barrel spoils a good apple: How uncertainty and networks affect whether matching rules can foster cooperation

Project info

Work package
  • Theory
Sustainability threat
  • External Shocks
  • Network co-evolution

Study info

Related studies according to other researchers
Diffusion of Binary vs Continuous Behavior across Social Networks
Description of Study
Meritocratic matching solves the problem of cooperation by ensuring that only prosocial agents group together while excluding proselfs who are less inclined to cooperate. However, matching is less effective when estimations of individual merit rely on group-level outcomes. Prosocials in uncooperative groups are unable to change the nature of the group and are themselves forced to defect to avoid exploitation. They are then indistinguishable from proselfs, preventing them from accessing cooperative groups. We investigate informal social networks as a potential solution. Interactions in dyadic network relations provide signals of individual cooperativeness which are easier to interpret. Network relations can thus help prosocials to escape from uncooperative groups. To test our intuitions, we develop an ABM modeling cooperative behavior based on a stochastic learning model with adaptive thresholds. We investigate both randomly and homophilously formed networks. We find that homophilous networks create conditions under which meritocratic matching can function as intended. Simulation experiments identify two underlying reasons. First, dyadic network interactions in homophilous networks differentiate more between prosocials and proselfs. Second, homophilous networks create groups of prosocial agents who are aware of each other’s behavior. The stronger this prosociality segregation is, the more easily prosocials cooperate in the group context. Further analyses also highlight a downside of homophilous networks. When prosocials successfully escape from uncooperative groups, non-cooperatives have fewer encounters with prosocials, diminishing their chances to learn to cooperate through those encounters.
Study research question
To what degree does the "bad barrels" problem occur and how can we readily solve the issue for "spoiled good apples"? Additionally, under which conditions does the social network provide a solution to the bad barrels problem?
Collection provenance
  • Collected during project
Collection methods
  • Simulation
Personal data
External Source
Source description
File formats
  • .R
  • .csv
Data types
  • Structured
Coverage start
Coverage end
Spatial coverage
Collection period start
Collection period end


Unit description
Sample size
Sampling method
simulated agents
Intuition 1. Due to mismatching, prosocial agents cooperate less when matching is based on agents’ prior group performance.
Earlier work leads to the intuition that prosocials develop a low level of cooperation through reciprocity if mismatched into groups with many non-cooperative members. Thus, when outsiders are incapable of perfectly inferring the qualities of a group member by observing group outcomes and individual contributions, these “good apples” are spoiled. Various strands of literature support the assumption that human decision-makers tend to (falsely) infer individual qualities from group characteristics, as suggested, for example, by research on fundamental attribution error (Ross 1977) and statistical discrimination (Fang & Moro 2011).
Intuition 2. The possibility to signal prosociality in dyadic network interactions increases cooperation among prosocials.
In order to escape the negative reputation of a poorly performing group, innately cooperative individuals need some other channel through which they can show their individual quality. Dyadic interactions in informal networks allow for the development of individual reputations (Buskens & Raub 2002; Raub & Weesie 1990). Once cooperative reputations have been established in such dyadic interactions, agents from other groups can use the network information in addition to information in the group context when determining the matching of agents into new groups. This allows them to eventually achieve higher levels of cooperation.
Intuition 3. Network clustering and information from dyadic network interactions increase cooperation levels of formerly mismatched prosocials in the group context.
In a homophilous network, cooperative types are more likely to cluster together and mainly, but not exclusively, interact with other cooperative types. Homophily thus increases the chances that members of highly cooperative groups interact with mismatched “good apples” from low-performing groups. It thus further improves the possibility of mismatched cooperators being “spotted” as potentially promising new recruits.
Variable type
Variable name
Variable description
Dependent variable
dichotomous cooperation decision
Independent variable
matching rule
Which matching rule we apply to our simulated population; 6 variations
Independent variable
network condition
Whether an agent is embedded in a random or homophilous network
Discipline-specific operationalizations
Conflict of interest

Data packages

Bad Barrels and Good Apples

Simulated data and R-script to analyze the data.
Restricted Access
User license
CC-By Attribution 4.0 International
Retention period

Two agent-based models of cooperation in dynamic groups and fixed social networks (version 1.0.0)

Open Access
User license
Retention period


A Bad Barrel Spoils a Good Apple: How Uncertainty and Networks Affect Whether Matching Rules Can Foster Cooperation

de Matos Fernandes, Carlos A., Flache, Andreas, Bakker, Dieko M. and Dijkstra, Jacob (2022) 'A Bad Barrel Spoils a Good Apple: How Uncertainty and Networks Affect Whether Matching Rules Can Foster Cooperation' Journal of Artificial Societies and Social Simulation 25 (1) 6 . doi: 10.18564/jasss.4754




Ethical assessment
Ethical committee