Emergent Revolution — 13 AI Colonies That Teach Themselves to Be Free
For Week 2 of Summer Into AI (theme: Independence Engines), I wanted to build independence as something that has to be learned — not declared, not scripted. So I gave thirteen colonies brains and let them figure it out.

What it is
Each of the 13 colonies is a reinforcement-learning agent — tabular Q-learning, written from scratch, no libraries, no LLM, no cloud. Every round each one chooses: stay loyal and pay the Crown’s tax, or revolt. Revolt alone and you’re crushed; revolt together and you trade as free states while the Crown’s grip weakens. Nobody codes the revolution — it emerges as a learned equilibrium, and you can flip the whole map between a loyalist coast and 1776 with three incentive sliders.
How it’s built
- From-scratch tabular Q-learning per colony (ε-greedy, annealed exploration) over a tiny state space — no ML library.
- A repeated coordination game (a stag hunt): the Crown’s ability to crush rebels decays as the revolt spreads, so a critical mass tips into a self-reinforcing cascade.
- The real 1773 Committees of Correspondence are wired in as long-range graph edges (MA↔VA, NY↔SC, PA↔GA).
- A headless harness (
window.__sim) verifies the result: a sharp phase transition, a rising learning curve, and — the honesty proof — freeze the learning and the revolution never comes.

On the theme
Independence as a learned equilibrium in a multi-agent system — the thing thirteen self-interested actors have to coordinate their way into, against a power that punishes whoever moves first and alone. The revolution isn’t drawn on screen; it’s computed, by minds that started with nothing.
Try it →Code →All the builds →
Shout-out
Part of the competition is cross-referencing other builders. So: shout-out to Jake Strait — his Drafted (staging the real Declaration vote) and The Convention (five LLM instances debating) are the perfect mirror: he puts you inside the founders’ decision; this one grows it from scratch.
Built for Summer Into AI 2026 (Competition #2), hosted by Eric Rhea. More in the build log.