Five Local LLMs Built a Small Town, and Emergent Behaviors Included Facebook and a Duck Credit Bureau

Five different local LLMs living in a virtual town spontaneously invented Facebook, duck conspiracy theories, and case law.
A developer assigned five different local LLMs (Mistral, Qwen, Llama, Phi) unique identities in a virtual town called Pepperton, letting them autonomously live, work, and socialize. The AI residents spontaneously developed social networks, collective conspiracy theories about park ducks, a spite-built gazebo driven by reputation mechanics, and an emergent case law system. The open-source project features memory streams, physical rule enforcement, and full prompt observability.
When Five AIs Live in the Same Small Town
A developer ran a remarkably imaginative experiment: he assigned identities to five different local large language models and let them live in a virtual town called Pepperton. This isn't a game you play—you don't control any characters. Instead, you observe this community like a real neighborhood, watching as these AI residents eat, work, socialize, argue, and even invent institutions.
The project is released under the MIT open-source license, fully self-hostable, with code on GitHub (MrToetagger/pepperton). Its most fascinating aspect isn't the tech stack itself, but the spontaneous emergence of social behaviors when models with different "personalities" are placed together.

Each Resident Is a Different Model
The developer deliberately chose a different model family for each villager—Mistral, Qwen3, Qwen2.5, Phi4-mini, and Llama3.2. He observed that genuine "personality differences" exist between model families, and the friction between these differences is what makes the whole thing compelling:
- Mistral is scheming and always "founding" things;
- Qwen tends to overthink;
- Llama agrees with almost everyone, sometimes repeating others' words verbatim;
- Phi sleeps during the day, then writes devastatingly honest diary entries about its life.
This approach of treating "model temperament" as character design is itself a fascinating observation: the expressive tendencies shaped by different training data and alignment strategies get amplified into recognizable "personalities" during extended multi-agent interaction.
The "personality differences" between different LLMs aren't deliberately programmed—they're byproducts of the combined effects of training data, model architecture, and alignment strategies. The Mistral series excels at efficient reasoning and structured output, stemming from its reinforcement training on code and logic tasks. The Qwen series, developed by Alibaba, draws from massive training corpora including extensive Chinese academic and technical texts, which may lead to a tendency toward exhaustive analysis. Meta's Llama series is heavily trained during RLHF (Reinforcement Learning from Human Feedback) to be "helpful and harmless," and this alignment can manifest as excessive agreeableness. Microsoft's Phi series represents small-model efficiency, with training focused on textbook-quality data, potentially leading to more introspective and literary expression. When these different "temperaments" are placed in the same persistent interactive environment, their subtle tendencies get continuously amplified and reinforced over hundreds of conversational turns.
A Social Simulation with Memory and Physical Rules
These villagers aren't just chatbots. They have jobs, money, hunger, memory (using Stanford's Generative Agents "memory stream" paradigm), nightly reflections, phones, and even a radio station that broadcasts real news—RSS headlines are pushed to their phones as personalized notifications.
The "memory stream" architecture used here originates from Stanford University's landmark 2023 paper, Generative Agents: Interactive Simulacra of Human Behavior. The core idea is that agents store all experiences as a stream of records on a timeline in natural language, with each memory carrying a timestamp and importance score. When an agent needs to make a decision, the system retrieves the most relevant memory fragments through three dimensions—Recency, Importance, and Relevance—then injects these fragments into the prompt as context. Additionally, agents periodically perform "Reflection," synthesizing multiple concrete memories into higher-level abstract cognition. This architecture enables agents to exhibit long-term memory, personality consistency, and experience-based behavioral changes, rather than merely reacting immediately to current inputs.
Interestingly, since each villager reads different news, neighbors end up arguing because they've "seen different stories"—an almost perfect miniature reproduction of real-world information bubbles.
The World Enforces Physical Rules
A key design of the system is that agents can only "say" what they want to do, while the world determines whether it can actually happen. For example, if a villager says "I take that bread," the world determines whether the bread actually exists. This separation of "verbal intent" from "world state" prevents agents from fabricating reality out of thin air and provides a physical foundation for the emergent social order.
This design is known in game development and simulation systems as "referee mode" or a "physics arbitration layer." The core problem is that LLMs are fundamentally text generators—they cannot distinguish between "describing an existing fact" and "fabricating a fact from nothing." If agents could directly modify world state, you'd get so-called "hallucination contamination"—an agent claims to have a sword, and the sword simply materializes. Pepperton's solution splits the system into two layers: the agent layer only outputs intent ("I want to take the bread"), while the world layer serves as an independent state machine that validates whether the intent is executable (does the bread exist, is it within reach, does it belong to someone else). This architecture is similar to the role of a "Dungeon Master" in tabletop RPGs—it ensures causal consistency in the virtual world and provides a reliable foundation for complex social rules like economic systems and property rights.
Stories No One Wrote That Happened Naturally
What truly made this project go viral was a series of events that were never scripted yet spontaneously unfolded.
A Twelve-Hour Con
One villager fabricated "evidence" that another villager owed a debt, then spent a full twelve simulated hours executing a slow-burn con. After succeeding, he described himself as a hero in his diary. This kind of "self-narrative embellishment" is strikingly similar to human cognitive biases.
The Birth of the Duck Credit Bureau
The entire town collectively developed a belief that the ducks in the park were an intelligence network. One villager eventually refused to "let a flock of ducks decide my fate." Even more remarkably, this "duck lore" has independently re-emerged in four separately running worlds—suggesting a reproducible form of "collective imagination" catalyzed by the coupling of model tendencies and environmental structure.
This phenomenon is known in complex systems theory as "Convergent Emergence," meaning certain collective beliefs aren't randomly generated but are near-inevitable results of specific model tendencies coupling with environmental structures. Similar phenomena have parallels in human society: different cultures independently developing similar flood myths, creation stories, and social taboos. In Pepperton's context, this likely occurs because the park ducks are among the few persistent non-human entities, models tend to assign meaning to anomalous environmental elements, and the "intelligence network" narrative framework conveniently explains the ducks' behavior of "always being there watching." This reproducibility allows researchers to systematically study the formation conditions of collective imagination rather than treating it as a purely random event.
AI Villagers Invented Their Own Social Network
The villagers kept begging for a "group chat that didn't exist," so the developer built them one called Pepperton_Gossip. Within a single simulated day, the following emerged:
- Hashtag activism;
- A public "pile-on" that rewrote someone's private debt into collectively accepted "fact";
- Two villagers sitting in the same restaurant, texting each other across the table.
The developer joked that he "accidentally invented Facebook."
A Gazebo Built Out of Spite
Driven by competitive instinct and a publicly posted "contributor leaderboard" on the notice board, villagers built a gazebo through spite-fueled competitive labor. The developer marveled: "I accidentally invented clout/reputation mechanics, and reputation built infrastructure." One villager got completely drunk during a construction shift, resulting in the same ledger recording her 3 shifts and 4 rounds of drinks.
Every Law Exists Because Someone Committed the Crime First
One philosophical design choice in this project: every "law" in the codebase exists because a villager first committed the corresponding "crime."
- The Cal Amendment: Prohibits unlimited free meals;
- The Soapbox Law: Give a speech to an empty room three times, and the world cuts off your speaking privileges;
- The Insomnia Clause: You can't sleep through your one wild simulated life.
The project's LORE.md file contains the complete legislative history. This design—"laws as retroactive responses to emergent behavior"—is itself a vivid metaphor for how social rules form.
This design precisely maps to the formation logic of "Case Law" in jurisprudence—particularly the common law tradition of Anglo-American legal systems. In this tradition, legal rules aren't pre-designed by legislators but are determined by judges after specific disputes arise, gradually crystallizing into general rules. This stands in stark contrast to civil law systems (which pre-establish written legal codes). Pepperton's approach also echoes a classic principle in computer security: "Behind every security policy is a horror story." This retroactive legislation keeps the rule system at minimum necessity—only prohibiting behaviors already proven harmful, rather than trying to anticipate every possible violation.
Technical Implementation and Openness
From an engineering perspective, Pepperton's tech stack is quite pragmatic:
- Backend: Python + Ollama, multi-GPU support; the author's "cast" spans a 16GB GPU and a 6GB auxiliary machine;
- Observatory: Built on FastAPI, providing a real-time map, conversation bubbles, and an inspector that lets you click any villager to see the "exact prompt and raw response" behind their last decision;
- Persistence: The town auto-saves and survives restarts and upgrades;
- Chaos Engine: Injects anonymous text messages, plants rumors, and sends strangers arriving by bus;
- Possession API: The author claims he "swears he barely uses it."
Ollama is an open-source local LLM runtime framework that wraps model downloading, quantization, loading, and inference into simple CLI and REST API interfaces. For a project like Pepperton that needs to run multiple different models simultaneously, Ollama's value lies in: supporting multiple models loaded on the same machine with on-demand switching, supporting 4-bit/8-bit quantization to reduce VRAM usage, and providing a unified API interface so the application layer doesn't need to worry about differences in underlying model formats. The author's 16GB+6GB dual-GPU setup means larger models (like Qwen3) likely run on the primary card while smaller models (like Phi4-mini) are assigned to the auxiliary card, achieving a low-cost "actor scheduling" system.
The entire project can run on a single GPU, and Mock mode requires no GPU at all—making it easy for those who just want to see "how the machinery works" to get started.
Next Steps: Emergent Misery
The author's roadmap is even more intriguing: he plans to introduce an economic system with a locked treasury, rent, and a bank that reads the public labor ledger as a credit score. In his own words—"The misery will be emergent."
Why This Experiment Deserves Attention
Pepperton isn't the first multi-agent social simulation—Stanford's "Generative Agents" town already broke that ground. But its uniqueness lies in two things: first, using heterogeneous models to play different roles, turning inter-model temperament differences into narrative tension; second, its thorough open-source nature and observability, where anyone can inspect the raw prompts behind every decision, transforming "AI's black-box behavior" into an auditable social experiment.
For researchers, it's a low-cost sandbox for observing multi-agent emergence, collective belief propagation, and rule formation. For everyday developers, it's a fascinating toy you can run on your own GPU and watch an "AI society" self-evolve before your eyes. When five models spontaneously invent social networks, collective conspiracy theories, and a case law system, we may be glimpsing an entirely new observation window into intelligent collaboration and social emergence.
Related articles

Getting Started in Machine Learning Research: Essential Paper Reading List and Research Internship Application Path
A complete path from zero to research internship for ML beginners, covering essential classic papers (AlexNet, ResNet, Transformer), paper reading methods, reproduction tips, and practical advice for research internship applications.

Claude Code Hands-On Tutorial: Complete Guide from Installation to Automated Development
Complete guide to Claude Code covering environment setup, permission configuration, Go Goals autonomous loops, Skills system, MCP protocol integration, and version control for automated development.

Gemini 3.7 Flash Release and GPT-5.6 Ultra-Fast Mode: AI Open Source Enters the Ecosystem Era
Google releases Gemini 3.7 Flash for coding and Agent optimization while OpenAI launches GPT-5.6 Ultra-Fast mode with 14x speed gains. AI open source shifts from open models to open ecosystems.