MASTOC-LLM (Multi-Agent System Tragedy of the Commons - Large Language Models) 1.0.0
MASTOC-LLM extends the classic Multi-Agent System Tragedy of the Commons (MASTOC) model by replacing hard-coded behavioral rules with autonomous decision-making powered by large language models (LLMs). Three heterogeneous agents manage herds of cows on a shared grassland commons. Each tick, an agent receives a structured prompt describing current resource levels, its own herd size, peer behavior, and — optionally — a rolling memory of recent rounds and messages from neighboring agents. The LLM returns a stocking decision (add, remove, or hold cows) together with a natural-language rationale and, when communication is enabled, a short message to broadcast to peers.
The model is designed to test whether LLM agents spontaneously develop Ostrom-style common-pool resource governance (mutual monitoring, graduated sanctions, graduated rule revision) or instead fall into identifiable failure modes. Preliminary experiments with Claude Haiku 4.5, GPT-5.4-mini, and DeepSeek R1:32b have revealed four recurring collapse patterns — Cooperative Paralysis, Defection Cascade, Overshoot-Panic, and Hybrid Architecture Failure — whose onset timing is sensitive to memory length, inter-agent communication, and the post-training alignment approach of the underlying model.
MASTOC-LLM is intended as a laboratory for generative agent-based modelling (GABM) methodology: it provides a clean, well-understood commons baseline against which LLM behavioral hypotheses can be systematically tested and compared across models, parameter sweeps, and alignment regimes.
Release Notes
Netlogo model depends on Python backend – please pull from Github to enable full functionality.
NetLogo (MASTOC-LLM.nlogo)
│ per-tick context (pool state, herd sizes, payoffs, messages)
▼
Python bridge (mastoc_llm_bridge.py)
│ LLM prompt + rolling memory + inbox messages
│ (per-agent backend and model — agents can differ)
▼
LLM API ← Anthropic | OpenAI | Google | Ollama (local)
│ JSON response: { action, message, reasoning }
▼
NetLogo ← action (−1 / 0 / +1) + outgoing message → neighbors