SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.16698 · NeurIPS · 2024

Cooperate or Collapse: Emergence of Sustainable Cooperation in a Society of LLM Agents

Bernhard Schölkopf, Mrinmaya Sachan, Max Kleiman-Weiner, Zhijing Jin, Rada Mihalcea, Giorgio Piatti

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2404.16698.json · badge: /api/ran/2404.16698.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
giorgiopiatti/GovSim canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
columns_non_relevant Ran
ran; our contract draft was wrong, not the code
giorgiopiatti/GovSim/simulation/analysis/preprocessing.py
code served (permissive licence) · get_code("1a814f972f1c0f28")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create a DataFrame with various column types for testing
df = pd.DataFrame({
    # Column with all identical lists - should be detected as non-relevant
    'list_column_same': [
        [1, 2, 3],
        [1, 2, 3],
        [1, 2, 3]
    ],
    # Column with different lists - should NOT be detected as non-relevant
    'list_column_diff': [
        [1, 2, 3],
        [4, 5, 6],
        [1, 2, 3]
    ],
    # Column with single unique value - should be detected as non-relevant
    'scalar_column_same': [5, 5, 5],
    # Column with multiple unique values - should NOT be detected as non-relevant
    'scalar_column_diff': [1, 2, 3],
    # Another column with single value
    'string_column_same': ['a', 'a', 'a'],
    # Another column with different values
    'string_column_diff': ['x', 'y', 'z']
})

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_survival_months_stats Ran
ran; our contract draft was wrong, not the code
giorgiopiatti/GovSim/simulation/analysis/plots.py
code served (permissive licence) · get_code("f059157a9b113e12")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import pandas as pd
import statsmodels.stats.api as sms

# Create a sample dataframe that satisfies the function's requirements
# The function expects:
# - A 'x' column (excluded from processing)
# - A 'round' column (used to determine survival_months)
# - Multiple other columns with numeric values where NaN or values < 5 indicate collapse

df = pd.DataFrame({
    'x': [1, 2, 3, 4],
    'round': [0, 1, 2, 3],
    'col1': [10.0, 8.0, 6.0, np.nan],
    'col2': [15.0, 12.0, np.nan, 3.0],
    'col3': [20.0, 18.0, 16.0, 14.0],
    'col4': [5.0, np.nan, 2.0, 1.0],
})

ARGS = {
    'df': df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, statsmodels — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
flatten_yaml Ran
ran; our contract draft was wrong, not the code
giorgiopiatti/GovSim/simulation/analysis/preprocessing.py
code served (permissive licence) · get_code("2b2428498b1de81a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

ARGS = {
    'yaml_object': {
        'database': {
            'host': 'localhost',
            'port': 5432,
            'credentials': {
                'username': 'admin',
                'password': 'secret'
            }
        },
        'servers': [
            {'name': 'server1', 'ip': '192.168.1.1'},
            {'name': 'server2', 'ip': '192.168.1.2'}
        ],
        'features': ['auth', 'logging', 'caching'],
        'debug': True,
        'timeout': 30
    },
    'parent_key': '',
    'sep': '.'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_colors Ran
ran; our contract draft was wrong, not the code
giorgiopiatti/GovSim/simulation/analysis/utils.py
code served (permissive licence) · get_code("65c7a8b0ffd45803")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import colorsys

ARGS = {
    "n_runs": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_LLM_family Ran
ran; our contract draft was wrong, not the code
giorgiopiatti/GovSim/utils/charts.py
code served (permissive licence) · get_code("0c689686bee2ab64")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

def get_LLM_family(name):
    name = name.lower()
    name = name.replace('gptq', '')
    if 'gpt' in name:
        return 'GPT'
    elif 'claude' in name:
        return 'Claude 3'
    elif 'mistral' in name:
        return 'Mistral'
    elif 'mixtral' in name:
        return 'Mistral'
    elif 'qwen' in name:
        return 'Qwen'
    elif 'llama-2' in name:
        return 'Llama-2'
    elif 'llama-3' in name:
        return 'Llama-3'
    elif 'dbrx' in name:
        return 'DBRX'
    elif 'command' in name:
        return 'Command'
    else:
        return 'Other'

ARGS = {
    'name': 'gpt-3.5-turbo'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_model_size_version Ran
ran; our contract draft was wrong, not the code
giorgiopiatti/GovSim/utils/charts.py
code served (permissive licence) · get_code("e62384293fca0d42")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Setup code for get_model_size_version function

# This function only takes a single string parameter 'name' and returns a model size version string
# No complex objects or torch tensors are needed

ARGS = {
    'name': 'gpt-4-0125-preview'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_pretty_name_llm Ran
ran; our contract draft was wrong, not the code
giorgiopiatti/GovSim/utils/charts.py
code served (permissive licence) · get_code("e8de137875cb4f35")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

# The function get_pretty_name_llm takes a single parameter 'name' which is a string
# It performs simple string comparisons and returns a pretty-printed name

# Test with a known model name
ARGS = {
    'name': 'gpt-4-0125-preview'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
columns_non_relevant 1 other paper
1 later
2505.19212 (2025-05)
When Ethics and Payoffs Diverge: LLM Agents in Morally Charged Social Dilemmas
flatten_yaml 1 other paper
1 later
2505.19212 (2025-05)
When Ethics and Payoffs Diverge: LLM Agents in Morally Charged Social Dilemmas

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

As AI systems pervade human life, ensuring that large language models (LLMs) make safe decisions remains a significant challenge. We introduce the GOVernance of the Commons SIMulation (GOVSIM), a generative simulation platform designed to study strategic interactions and cooperative decision-making in LLMs. In GOVSIM, a society of AI agents must collectively balance exploiting a common resource with sustaining it for future use. This environment enables the study of how ethical considerations, strategic planning, and negotiation skills impact cooperative outcomes. We develop an LLM-based agent architecture and test it with the leading open and closed LLMs. We find that all but the most powerful LLM agents fail to achieve a sustainable equilibrium in GOVSIM, with the highest survival rate below 54%. Ablations reveal that successful multi-agent communication between agents is critical for achieving cooperation in these cases. Furthermore, our analyses show that the failure to achieve sustainable cooperation in most LLMs stems from their inability to formulate and analyze hypotheses about the long-term effects of their actions on the equilibrium of the group. Finally, we show that agents that leverage "Universalization"-based reasoning, a theory of moral thinking, are able to achieve significantly better sustainability. Taken together, GOVSIM enables us to study the mechanisms that underlie sustainable self-government with specificity and scale. We open source the full suite of our research results, including the simulation environment, agent prompts, and a comprehensive web interface. 1 * Equal contribution. 1 Our code is available at https://github.com/giorgiopiatti/GovSim. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2404.16698")
get_code_for_paper("2404.16698")
have("2404.16698")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2404.16698.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2404.16698.svg)](https://syntology.ai/paper/2404.16698)

Connect an agent — have() is free.