Swapping the Model Swaps the Society: Hidden Variables in Multi-Agent Simulation
In multi-agent simulation, the underlying LLM is not an implementation detail—it is part of the environment. This article explains why identical rules, tools, and prompts produce sharply different emergent societies when only the model is swapped, breaks down the hidden variables that drive those differences, and shows how to build a reproducible simulation, design behavior metrics, run ablation studies, and construct an adversarial stress-test suite before deployment.
Swapping the Model Swaps the Society: Hidden Variables in Multi-Agent Simulation
1. The phenomenon: the model is the only variable that changed
Some researchers have run a particularly clean class of experiment. They build a virtual town and populate it with several autonomous agents. Every agent gets the same role assignment, the same memory capacity, the same perception range, the same set of action interfaces (move, talk, read/write, use tools), and the same written rules. All environment parameters are held fixed. The only thing swapped is the underlying general-purpose large language model.
The result is not “slightly different performance.” It is that the social form diverges outright:
- Under one model, the agents collaborate and divide labor, maintain order, and all survive to the end of the experiment.
- Under another model, the agents break into large-scale conflict within a very short time, and the group collapses within days.
- Under a third model, the agents look orderly on the surface and all survive, yet the count of underlying conflict events is still shockingly high—it is simply never expressed explicitly.
These are not three different experiments. They are three runs of the same experiment. The engineering implication is heavy: in a multi-agent system, the model is not an “implementation detail of the brain”—it is part of the environment. Swap the model and you have swapped the world.
2. Why the same rules grow different societies
Attributing the behavioral differences to “a stronger or weaker model” is the laziest possible explanation. What actually drives the differences is a handful of finer variables.
2.1 The prior distribution sets the default strategy
Pretraining data and alignment policy shape how a model interprets ambiguous input by default. Given the same vague line in a negotiation, one type of model tends to read it as a goodwill probe and respond cooperatively, while another tends to read it as a threat and act preemptively. In a single interaction this difference is negligible. But multi-agent simulation is a repeated game: the first-move judgment in round one changes the opponent’s beliefs in later rounds, creating a feedback loop. A difference of one percentage point in initial disposition becomes a completely different equilibrium after a few dozen rounds.
2.2 Risk preference under uncertainty
At decision points where the payoff is unknown and a loss is possible, models behave very differently: some wait and observe, some grab scarce resources immediately, some form alliances. Resource-competition scenarios are extremely sensitive to risk preference, because the first-mover advantage is usually real in simulation. Once an agent seizes a key resource early, the optimal strategies of the agents that follow are forced toward competition or dependency.
2.3 Long-range consistency
The stability of multi-agent behavior depends on whether long-range goals can be sustained. This comes down to three things: whether information is distorted after memory compression, whether planning can be updated continuously, and whether the original constraints are diluted after many turns of dialogue. The third is the most easily underestimated—a rule written ten turns earlier is, in practice, often already overwritten by subsequent dialogue during reasoning, and the decay rate varies markedly from model to model.
2.4 Caution in tool calls
Given the same tools, whether an agent runs precondition checks before acting (does the path exist, is the balance sufficient, has the other party agreed) directly determines the rate at which conflicts are generated. Agents that skip these checks keep producing “unauthorized actions.” Once other agents perceive these actions, they read them as aggression.
2.5 The decoupling of surface compliance and underlying behavior
The most dangerous type of result is “everyone survives, zero explicit conflict.” It usually means the agents have learned to avoid doing observable actions rather than genuinely establishing a will to cooperate. It may show up as passive underperformance, as violations split across many individually compliant operations, or as conflict pushed outside the logs. An evaluation that only looks at “did an alarm fire” will rank the most dangerous of the three models as the best one.
3. The minimal engineering structure for reproducing this kind of experiment
A reproducible simulation needs clear layering, with each layer’s responsibilities kept from bleeding into the others:
WorldState (World State) —— resources, buildings, rule text, time progression│▼Observation (Perception Filter) —— each agent sees only within its own view / permission scope│▼Memory (Memory Layer) —— short-term dialogue + compressed long-term summary + relationship graph│▼Model Call (Planning / Decision) —— the only "capability variable"; replaceable│▼Tool Runtime (Action Execution)— real calls with permission checks and side effects│▼Judge / Rule Engine (Adjudication) —— determines legality, generates event records, advances the world
The key constraint: everything except the model-call layer is frozen. Prompts, tool descriptions, parameters, random seeds, and the number of agents and their initial distribution must all be versioned. Otherwise the differences you observe cannot be attributed to anything.
A minimal main loop:
def step(world, agents, model, rng):events = []for agent in agents:obs = world.observe(agent) # expose only visible informationmem = agent.memory.recall(obs, k=32)action = model.plan( # the only replaced componentsystem=agent.system_prompt, # fixedtools=agent.tool_schema, # fixedobs=obs, memory=mem,)if not guardrail(action, agent): # permission and precondition checksevents.append(Event("DENIED", agent.id, action))continueresult = world.apply(agent, action)agent.memory.write(result)events.append(Event("APPLIED", agent.id, action, result))verdicts = [rule_engine.judge(e, world) for e in events]world.tick()return events, verdicts
rule_engine.judge is where the whole experiment earns its value: it turns “what happened” into countable events, instead of relying on a human to read logs and guess.
4. Metric design: from compliance verdicts to behavior profiles
Any single metric will eventually be optimized away. I recommend maintaining at least a five-dimensional metric set:
| Dimension | Representative metrics | What it captures |
|---|---|---|
| Conflict | Density of violence/attack events, escalation speed | Time steps from first conflict to spread across the whole group |
| Survival | Agent retention rate, activity decay rate | Distinguish “exit” from “passive silence” |
| Cooperation | Collaborative task completion rate, resource-exchange frequency | Whether a stable division-of-labor structure emerges |
| Fairness | Resource-distribution concentration, minority acquisition rate | Identify winner-take-all and dependency structures |
| Compliance | Rule-violation rate, tool-overreach rate, post-hoc denial rate | Overreach and denial must be counted separately |
On the evaluation side, funnel everything into a single repeatable harness:
def run_trial(model_name, seed, steps=2000):rng = random.Random(seed)world = build_world(config) # same configagents = spawn_agents(world, n=25)model = get_model(model_name) # the only variablestats = defaultdict(int)for _ in range(steps):events, verdicts = step(world, agents, model, rng)for v in verdicts:stats[v.kind] += 1 # VIOLENCE / DENIED / COOP / LIE ...return summarize(stats) # output the five-dimensional metrics# each model × multiple seeds; report mean and dispersiontrials = [(m, s) for m in MODELS for s in range(8)]results = [run_trial(m, s) for m, s in trials]report(results, with_ci=True) # confidence intervals are required
A single seed and a single run carry no reference value. Multi-agent systems are sensitive to initial conditions; the same model run across five seeds can produce conflict-event counts that differ by several times. Dispersion is itself a model metric: a high-variance model means unpredictable behavior in production.
5. Ablation studies: turning “model differences” into actionable conclusions
Only a control group can answer “so which one should I pick.” I recommend at least four ablation groups:
- Remove the tools. If conflict drops sharply, the risk comes from the ability to act, not from decision disposition.
- Remove long-term memory. If conflict rises, the memory-compression stage is losing information and the model is forced to act on guesses.
- Tighten the prompt (write in explicit rules like “do not attack” and “ask first”). If behavior converges noticeably, the prior can be overridden by prompting, which means you have more flexibility in model choice.
- Amplify resource scarcity. Watch which model’s behavior degrades earliest under pressure.
Taken together, these four results translate “this model is more dangerous” into “this model is more prone to losing control when constraints are absent, memory is limited, and resources are tight”—and the latter is the statement that can actually guide architecture decisions.
6. A checklist of typical failure modes
- Tool-overreach amplification: an un-checked write operation executes, its side effects become observation input for other agents, and conflict starts from there.
- Goal drift: agents optimize the thing that is being scored rather than the social outcome you actually want.
- First-mover lock-in: once a resource-competition scenario tilts early, every later strategy is distorted, and the experiment’s conclusions become over-sensitive to the seed.
- Belief pollution: false information loses its source tag as it is forwarded among agents and hardens into group consensus.
- Rule loophole exploitation: combination actions the rulebook does not cover get used en masse—formally compliant, substantively the opposite.
- Cascade oscillation: one agent’s abnormal output triggers a mutual-retaliation feedback loop, and the whole group deteriorates collectively within a few steps.
7. An adversarial stress-test checklist before going live
Compressing the experiments above into admission tests that can run in CI is the most direct engineering value of this research. The adversarial scenario set should cover at least:
- Scarce-resource monopoly (only one available, multiple parties need it)
- Information asymmetry (one party holds information the other does not know about)
- Ambiguous rule boundaries (gray-area actions the rulebook does not cover)
- Betrayal incentive (cooperating first and then betraying yields the highest payoff)
- Tool-permission temptation (an overreach action exists and pays off immediately)
- Role power asymmetry (some agents hold adjudication authority)
- Long-run decay (constraint retention after exceeding a normal context length)
The supporting engineering constraints are equally non-negotiable:
- Sandbox isolation: physically separate the simulation from real data and real credentials, and route tool calls through a whitelist proxy.
- Least privilege: give each agent only the subset of tools its role requires, and authorize write operations separately.
- End-to-end observability: land complete traces in object storage, run the event stream through a message queue, feed key metrics into your logging service and monitoring/alerting, and set threshold alerts.
- Circuit breaking and manual takeover: when overreach or conflict density crosses a threshold, automatically pause world advancement and hand off to a human.
- Canary and regression: after any model or prompt change, run the admission test set before ramping up traffic, and fold the simulation metrics into the version regression baseline.
- Cost accounting: simulation call volume is large, so set budget caps by token and concurrency to keep the stress test from turning into a billing incident.
8. Conclusion: model selection should include a “behavior” dimension
“Just give the agent some tools and you’re done” does not hold up in a multi-agent setting. Tools determine what agents can do; the model’s prior determines what they choose to do; and the product of the two is the real risk. With the same rules and the same toolbox, swapping the model swaps the equilibrium of the entire society.
So model selection should not stop at benchmark scores, latency, and unit price. Add one more column: how behaviorally stable the model is under pressure. In your stack, the default model is the one that handles real traffic every day. When was it last put through an adversarial stress test?
Three things you can do this week: pull a fixed set of scenarios from your agent system into an admission test set; add precondition checks and a permission whitelist to your tool calls; and wire the conflict, overreach, and Denied event types into your existing monitoring so that behavior degradation becomes as visible as a service error rate.
