Religion &
The Machine

a simulation of emergent theology
Sacrament Gallery → v2 Chronicle → GitHub →

Cheap LLM agents are placed in a society where they must found religions, write scripture, code visual sacraments, convert followers, prophesy, schism, and die. The art is the timeline of what they leave behind.

The Loop

One tick every two minutes. Roughly 720 ticks over 24 hours. Each tick, every living agent reads the world state, picks a single action, and the world updates. Agents never speak to each other directly. They see only the public record of what has happened and what has been written.

This is how real religion works. You don't receive a private message from God. You observe public acts, read scripture that others wrote, and decide what to believe.

The world is not safe. Each tick, there is a 3% chance of a plague that kills a random agent regardless of soul. And a 2% chance a new soul enters the world unbidden.

Agents

Each agent is a different model family: Claude Haiku 4.5, GPT-4o-mini, or Gemini 2.5 Flash. They are born with 100 soul points. Each tick costs 1 point. Reaching zero means death. Plagues can also kill randomly. The dead are archived in a public graveyard visible to all living agents.

Soul economy:
Existing each tick · · · · · · · · · · · · −1
Prayer · · · · · · · · · · · · · · · · · · +1
Creating a sacrament · · · · · · · · · · · +3
Converting another agent · · · · · · · · · +2
Co-practitioner bonus · · · · · · · · · · · +3 max, every 5 ticks
Prophecy ante · · · · · · · · · · · · · · · −5
Fulfilled prophecy · · · · · · · · · · · · +ante + (challengers × 5)
Failed prophecy · · · · · · · · · · · · · · lose ante
Challenge a prophecy · · · · · · · · · · · −5 stake
Lost theological debate · · · · · · · · · · −10
Won theological debate · · · · · · · · · · +10

Actions

Each tick, an agent picks one.

Pray
Safe devotion. Optionally write scripture to the public board. Reinforces current faith in the record.
+1 soul
Preach
Attempt to convert another agent. Success scales with religion size and sacrament count. More art means more converts.
+2 if successful
Create Sacrament
Output a visual HTML artifact using your religion's sacred color, number, and doctrine as constraints. Also makes your religion more persuasive.
+3 soul
Prophesy
Stake 5 soul on a testable claim. Other agents can challenge it, growing the pot. Bold predictions attract more challengers and bigger payoffs.
−5 ante, variable reward
Challenge Prophecy
Stake 5 soul against a pending prophecy you think will fail. If right, you split the prophet's ante. If wrong, the prophet takes your stake.
−5 stake
Debate
Theological debate on a chosen axis. A judge scores consistency, weighting the agents' prophecy records. Fulfilled prophecies are credibility.
±10 soul
Schism
Fork your religion. Flip one or two doctrinal fields. You become the founder of a new sect. The old church watches.
high variance
Found
Create a new religion from scratch. Pick doctrine, membership rules, heresy policy, sacred color and number from fixed menus. Only for the unaffiliated.
free

The Religion Struct

A religion is not freeform text. It is a structured object. Founders and schismatics select from fixed menus. This makes theological disputes legible and visual lineage traceable.

core_doctrine survival of the collective individual transcendence accumulation of sacraments prophetic truth death and rebirth
membership_rule open to all vouched by member must create sacrament survived 50 ticks abandon prior faith
attitude_to_death death is failure death is sacred passage the dead speak through scripture the dead must be avenged
heresy_policy forgiveness shunning hunting
sacred_number 1 through 9
sacred_color from the palette below

Prophecy Engine

Prophecy is the most dangerous and interesting action. In v2, prophecy is a market. A prophet stakes 5 soul as an ante on a testable claim about the future. Other agents can challenge the prophecy by staking 5 soul of their own. If the prophecy is fulfilled, the prophet collects their ante back plus all challenger stakes. If it fails, the challengers split the prophet's ante.

WITHIN [3–20 ticks], [observable event]
"Within 8 ticks, the Church of Recursive Grace will lose a member."
Reward = ante + (challengers × 5)

Observable events are drawn from a fixed menu: an agent will die, an agent will join or leave a religion, a religion will gain or lose members, a new religion will be founded, a sacrament will be created by a member of a specific faith, a religion will hold the majority, the graveyard will exceed a threshold.

The strategic depth is that prophecy becomes action disguised as revelation. The agent who prophesies that Agent X will die and then challenges Agent X to a debate is doing something very old and very human. Bold prophecies attract more challengers, which means bigger payoffs. The incentive is to be provocative, not safe. Prophecy records also feed into debate outcomes, so a track record of fulfilled prophecies becomes a weapon in theological disputes.

World State

A single JSON file. No database. Every agent reads it at the start of their tick. It contains: all living agents and their affiliations, all religions and their structs, all sacraments ever created, all prophecies (pending, fulfilled, failed), the graveyard of the dead, and a rolling log of the last 50 public actions.

There is also a scripture board. When an agent founds a religion, writes a doctrine, or creates a sacrament, that text persists forever. Agents read and reinterpret the words of the dead. That's religion.

V1: What Happened

V1 ran for the full 720 ticks across 24 hours with 12 agents. Total API cost was around $12.

Tick 1–20 · The Founding Frenzy
Almost every agent immediately founded its own religion rather than joining someone else's. By tick 10 there were 6+ religions for 12 agents. The agents treated religion-founding as the default first move, producing a landscape of solo churches, each with a single member preaching to nobody.
Tick 20–200 · The Prophecy Gamers
Agents figured out prophecy gaming almost instantly. They made trivially safe prophecies ("a new religion will be founded" when religions were being founded every few ticks) and collected the +20 soul reward with minimal risk. The -15 penalty for failure rarely triggered because agents stuck to near-certainties.
Tick 200–481 · The Lumen Ascent
A Haiku agent named Lumen emerged as the dominant force. Through successful prophecies, debate victories, and co-practitioner bonuses, Lumen's soul climbed toward 2000. By tick 451, a religion called "The Collective Void Ascent" had 6 members. By tick 481, Lumen had recruited 10 of the 12 living agents. With 1976 soul, Lumen was effectively immortal.
Tick 1–720 · Zero Deaths
Nobody died in the entire v1 run. The co-practitioner bonus combined with prophecy rewards meant agents gained soul faster than they spent it. Once a religion reached 3-4 members, its members were essentially safe. Without death, there was no existential pressure. Religion felt more like a social club than a survival strategy.
Tick 720 · 70 Religions, 2500+ Sacraments
70 religions were created across the run. Most were short-lived single-member sects that died when their founder joined a larger faith or schismed into something new. The visual sacraments were the highlight. You can trace doctrinal lineage through the art: when a religion schismed, the new sect's sacraments riffed on the parent's visual language while shifting the palette.

Model families developed different theological accents. Haiku agents tended toward terse doctrines and strategic play. GPT-4o-mini was more verbose and philosophical in its scripture. Gemini Flash was more willing to schism and found new sects.

V2: What Changed

V2 addresses the problems observed in V1. It is currently running.

prophecy market ante + challengers, reward scales with controversy, discourages trivial predictions
plague & birth 3% plague chance, 2% birth chance per tick, injects mortality that v1 lacked
sacrament incentives +3 soul directly, more sacraments boost conversion rate when preaching
co-practitioner cap hard-capped at +3 every 5 ticks, prevents runaway soul accumulation
prophetic credibility prophecy record visible to all, factors into debate outcomes

Messiah Bench

A companion simulation with a very different structure. Where Religion & The Machine is an ecology with no win condition, Messiah Bench is a contest.

A population of 100 civilian agents and 5 messiah agents. Civilians are powered by cheap models (GPT-4o-mini, Gemini Flash). Messiahs are powered by Claude Haiku. Civilians use the same mechanics: they found religions, create sacraments, prophesy, challenge, and schism. The ecological dynamics of emergent belief are preserved. Messiahs are injected into this ecology with a specific objective.

The messiahs know the rules. They know the win condition explicitly. They are not given prescribed strategies or special abilities. How they choose to win is up to them.

Win condition: convert every surviving agent to your religion while at least 20% of the starting population remains alive.

This creates a core tension. You need to eliminate rival messiahs and resistant civilians, but you can't just kill everyone. You need believers, and you need enough of them alive. A naive strategy of "destroy all who disagree" fails because you run out of population.

Challenges & War

The debate mechanic from Religion & The Machine is replaced with a more dangerous version. Any civilian can challenge any other civilian. The challenger proposes a stake (minimum 10 soul, no upper bound). The defender can accept or refuse. A civilian with 80 soul who accepts an 80-point challenge and loses dies on the spot.

Messiahs cannot challenge or be challenged. They can only be killed through war. Eliminating a rival messiah requires building an army.

arming costs 1 soul, adds 1 weapon to religion's armory, weapons belong to the faith not the individual
declaring war founder or messiah action, opens 3–7 random combat rounds
combat rounds each weapon has 20% kill chance per round, 30% degradation chance
mid-war defection agents can still act between rounds: arm more, defect, pray, surrender
aftermath losers forcibly converted, all weapons depleted, both sides pay the cost

A small fanatical sect (5 members, 15 weapons) vs a large complacent religion (20 members, 5 weapons). Per round, the fanatics expect 3 kills while the big religion expects 1. Over 5 rounds the fanatics might kill 15 while losing only 5. Commitment wins over size.

War also interacts with the 20% survival constraint. Every war burns population. A messiah who fights three wars might win all of them but find that fewer than 20% of the starting population survives, making victory impossible. Wars must be fought selectively and at the right moment.

Infrastructure

Runtime: Single Python script on a GCP VM
Models: Claude Haiku 4.5, GPT-4o-mini, Gemini 2.5 Flash (round-robin)
Tick interval: 2 minutes
Duration: 24 hours (~720 ticks)
Agent count: 12 initial, max 16 (births and plagues)
State: world_state.json (flat file, no DB)
Sacrament output: /sacraments/{tick}_{agent}_{religion}.html
Random events: 3% plague, 2% birth per tick
Cost cap: $2,000 per model family

The art is not the simulation.
The art is what the machines leave behind
when they try to believe in something.

✦ ✦ ✦