Uncharted Territories

Uncharted Territories

Religion as Software Business

Tomas Pueyo's avatar
Tomas Pueyo
Jul 10, 2026
∙ Paid

What will be v6?

The contest for Uncharted Territories posters is ongoing. Go here to view the current entries and vote for your favorites so far. So far, my take is that there are many interesting concepts, in part thanks to AI, but that AI adds lots of meaningless details that don’t easily produce a great end product. The contest will remain open for a couple of weeks. Go here to submit your own entry!


I spent 15 years designing software products and businesses: reducing friction in onboarding, creating viral loops, building new features to increase retention, designing for improved network effects…

The more I did it, the more transparent the tactics that religions have used to grow became to me. It’s like the veil of complexity falls and the true structure of the world appears. Patterns that seemed incomprehensible suddenly make sense.

Yes, religion is like software: both produce ideas and rules instead of physical products, they have goals they translate into repeatable instructions focused on shaping human psychology and behavior, they have version control (anti-heresy) and forks (new sects), they optimize the onboarding, retention, viral loops, network effects…

With this lens, you start understanding why Christianity is the most widespread religion on Earth and why Islam spread so fast, having replaced smaller local religions like Facebook replaced Hi5 and SmallWorld. Why there are few Jews but the religion has survived 3,000 years, why each of these religions holds the beliefs it does, why their borders have barely changed in over 1,000 years, how they have evolved from one form to the other… You can understand why they emerged in the order they did, and why they were successful or failed. And it gives us a sense of what will happen with current religions in the future, and what new religions might arise.

And new versions come over time that improve on the previous ones, to make them work better and grow faster. In the previous articles, I showed how this is the case for Christianity and for Islam. The best way to illustrate this is through their evolution, from the v0 of animism and polytheism, following the software updates v1, v2, v3, v4, and v5.

v0: The Origin of Religious Belief

Finding Patterns

Which hominid was most successful: Those who saw patterns and drew quick conclusions to explain their causes, or those who didn’t? Obviously, the ones that reasoned through causality: Those who heard rustling in the bushes and thought “Lion!” would live longer than hominids who heard rustling in the bushes and thought “eh, who knows.” The hominids who saw their brother get struck by lightning and thought “The gods don’t want us on that hill, especially during thunderstorms” would live longer than hominids who thought “I wonder if that happens every time.”

Hominids who were constantly seeing cause-and-effect patterns were probably wrong most of the time, but if you’re superstitious and avoid repeating any behavior that preceded something bad, then you’re going to pass your genes on, and a thousand generations down the road your descendants are going to have brains that are great at imagining patterns, even those that aren’t really there.

Social Rites

When too many humans gather and they don’t have rules to code their conduct, tension arises. This makes collaboration hard, which keeps them poor. The groups that were prone to ease these tensions through some sort of activity would be able to collaborate more, and prevail. We call these activities rites. From this article by Rob Henderson:

San Bushmen (modern hunter-gatherers) will occasionally engage in a dance to dispel what they call “star sickness.” This mysterious force encompasses jealousy, anger, interpersonal conflicts, and a failure to exchange gifts. Such pressures give rise to hostilities and damage cohesion in the group.

One of the most disturbing social elements is young males, especially those deprived of social, economic, and mating opportunities. Disputes between them can easily spiral into reciprocal violence, especially when large numbers of allies can be recruited. Rites tailored to them are especially important. Dunbar studied them in early societies, and found religious rituals, feasting, singing, and dancing that have been shown to enhance social cohesion. Other social innovations (e.g., men’s clubs, socially recognized leaders) and regulated relationship arrangements (marriage, kinship, dowries) are all geared to lowering young male violence.

Ceremony

Ceremony is an important part of these social rites. From the book Ritual: How Seemingly Senseless Acts Make Life Worth Living, as explained by Henderson:

In a video, a man performed the ordinary action of picking up a glass, cleaning it with a cloth, pouring the drink, and inspecting it before setting it on a table.

In another video, the event was ritualized: after picking up the glass, he waved the cloth at it without touching it, raised the container high up before pouring it into the glass, and bowed to the glass before setting it on the table.

When the researchers asked participants whether the two glasses were the same in terms of their physical qualities, the participants generally said yes. But when asked which one was more special, a significant difference emerged: they favored the ritual drink. When asked which beverage they would prefer to have, participants were three times more likely to pick the “special” drink. And when participants were told that the gestures were part of a traditional ceremony practiced in Fiji, Gabon, or Ecuador, participants were even more likely to select the ritual drink.

So it looks like we’re naturally geared towards religious belief. What did it translate into?

v0 to v1: From Animism to Polytheism

When your daily experience is of nature, plants, animals that hide in bushes or under cover of darkness, their skeletal remains after death and consumption… The natural thing is to assume they share a similar experience to yours: Spirits inhabit every animal, like they inhabit every person. This is why most early societies were animist.

And since your daily experience is that of humans and animals, you bestow upon them the abilities of humans and animals, just more powerful. Gods eat, sleep, lust, lie, and get fooled like humans do. They feel love, sadness, anger. They’re also pretty amoral and selfish: They don’t care much about what happens in the big picture, just about what happens to them and their supporters.

Then came agriculture and suddenly humans start controlling their environment. A clear hierarchy starts emerging: humans above plants and animals. It makes sense that now not all animals and things are spirits, and humans emerge as having a special relationship with gods.

Gods become more and more human-like.

As agriculture becomes more widespread, life and death don’t depend on the animals and plants around you, but rather on weather, pests and wars. So it makes sense that each of these big factors of survival develop their own gods.1

Humans think gods trade favors with them: If you give them the right gift or the right sacrifice, they will be happy with you and will help you with whatever power they have. The relationship with them is like with a patron: You sacrifice something when you need something—rain, victory, a child. If you anger them, they’ll side against you.

Rituals are attempts to get these fabulously powerful but mysterious entities on your side, and they’re designed through trial and error: You gave a part of your harvest to the farming goddess, and the next year the harvest was great? Surely, that made her happy. We must continue. But we don’t know exactly what part of the rite worked, so we should try to copy it very precisely to make sure it works again. The clan that knows a specific rite controls a god and gets social advantages. The more rites and gods you control, the more power your clan has.

You prayed to your god before a battle, but you lost? Surely, your god is weak, and the god of the conqueror is stronger, so you might as well pray to him instead. That means they have specialties and territory over which they have jurisdiction, just like humans and animals. This means gods are local to specific regions. They can only perceive what they see or hear, which is why in the Iliad Hera seduces Zeus so that he doesn’t watch the battlefield, or why Diomedes wounds Aphrodite with a spear.2 There can be many gods, no exclusivity. There’s no ritual to convert or to be a member, no commitment, because there’s not really a full concept of a cohesive religion, just a bunch of gods that exist.

The further a society removed itself from nature, the more human its gods became.

Notice how these features make these religions weak:

  • Since gods are local—with their homes in specific cities or regions—they can’t spread much.

  • That ties them to the local state. When the state crumbles, the religion goes with it: Surely, the god must not have been very powerful if his protected state failed.

  • Everybody has a different version of the gods, and few of their features get recorded, because nobody knows them definitively: Everyone is just trying to figure out what they want through trial and error. So they evolve across time and space, they merge with other deities, they lapse…

If you like The Avengers, you understand these gods’ appeal.

The modern polytheism stack: (mostly) human-looking figures that spend a lot of time in the sky, with supernatural powers, very human desires and flaws, and a penchant for good and evil, moral judgment and epic fights. I’d like the god Ironman to help me build startups. The only difference is that we know the Avengers are fake and they can’t give you anything, whereas people used to think gods could help them.

Within these belief systems, some features of future religions start peeking through.

In Ancient Egypt, there’s an afterlife. People’s hearts are weighed at death, the wicked are annihilated, and the good survive. If you think about it, that’s pretty natural: Evolution has given us a fear of death, so coming up with an afterlife is the most reassuring belief. Tying it to proper behavior is pretty intuitive too, as that’s what happens in human interactions: Be nice to people, and they reward you. In the case of Egypt, good meant avoiding violence, exploiting the weak, theft, cheating, cruelty, lying, sacrilege, and public disruption. We can see an ethnic system emerge.

But this proto-feature is only accessible to elites, is only summarily defined,3 and isn’t tied to spreading the religion.

Zoroaster came to change this.

v2: Zoroastrianism

The religion of Ancient Iran started moving towards monotheism between 2000 and 1000 years BC. Then, between ~1200 and 600 BC appears Zoroastrianism, spurred by the religious reformer Zoroaster4. Zoroastrianism displays some interesting religious innovations.5 The most important is the crystallization of good and evil for everybody. There is still a judgment after death, but now it applies to everybody, not just the elites or those who could afford it. People do good things because they’re good, and vice versa. You should do more good things to be good, and fewer bad things. When you die, your specific soul is judged.6 This enables moral enforcement for every individual among the population. This judgment gets linked to an afterlife, and a proto-heaven and hell appear, which is very convenient because they’re a super cheap way to enforce behavior.

PRIEST ZOROASTER: Something very very very bad will happen to people if they don’t behave properly!
PRIEST DARIUS, whispering to ZOROASTER: But how can we know somebody did something wrong? How do we identify them? Punish them?
ZOROASTER: We go get them.

DARIUS: With what power?
ZOROASTER: Soldiers!
DARIUS: What if the soldiers don’t want to do it? Or are too expensive? Or at war? Or are the perpetrators? Or there are too many bad people? Or we can’t witness the deeds?
ZOROASTER: Good points. Hmmm…. OK OK, hear me out: What if we say the judge is God, not us, and he sees much more than us?

DARIUS: Okay, but how will people know we’re telling the truth? They’ll do a bad deed, wait for retribution, it won’t come, so they’ll carry on.
ZOROASTER: OK hold on… What if it happens after death?

DARIUS: What do you mean?
ZOROASTER: That way, they can’t say it’s false. They have no proof! They’ll be punished after death!
DARIUS: Genius! But we need to make sure the stick and the carrot are huge, otherwise people won’t care.
ZOROASTER: What if the punishment is really bad and it’s like forever? And vice versa: If you’re cool, you get a cool afterlife forever?
DARIUS: Yeah, totally, that would do it!

By introducing the concept of being good to each other, we suddenly get a religion that can enforce moral, collaborative, positive behavior across an entire region. People work more together instead of killing each other, wealth can accumulate, and society thrives.

Farvahar, the famous Zoroastrian symbol

Another innovation is that religion becomes dualistic: Only two main gods, for Good and Evil. All other deities become secondary. That’s just one step removed from monotheism: Obviously, everybody should follow the good one.

These innovations were certainly not designed with intention as I described in the conversation above, they likely came about through evolution. But as we know from the debate between intelligent design vs evolution, you don’t really need intelligent design for something significant to appear. With enough time, evolution can make it happen. The mechanism would be something like:

  • Lots of different prophets and priests are always coming up with new software ideas.

  • They debate ideas and combine them.7

  • The cleverest, most charismatic, or luckiest ones come up with a (software) combination that is more productive than any other version. This one spreads.

  • Entrepreneurial and efficient priests (which might or might not be the same as the theoreticians) take these ideas and help them spread faster and farther.8

In any case, Zoroastrianism was so successful that it became the state religion of the Persian Empires until the 600s AD, when Arabs conquered the Sassanid Empire and introduced Islam. Zoroastrianism persisted for centuries, but eventually dwindled. Yet today, there are still over 100,000 Zoroastrians in Iran. That’s the power of installing valuable new software.

But why did it appear then and there? Karl Jaspers and Peter Turchin speculated that they were the result of technological development. Here’s my interpretation.

Several innovations happened between 4000 BC and 1000 BC, including the domestication of horses, their mutation to be able to carry humans on their back, the invention of the wheel, and the discovery of iron smelting. These inventions made farming much easier and scalable. And war. Horseback riding enabled horse-mounted roaming. Curiously, as soon as the secret of iron smelting became widespread, most eastern Mediterranean civilizations collapsed, probably enabled by bandits who now had easy access to weapons.

All of this suggests that, through these thousands of years:

  • Empires became viable, because agriculture improved and now farmers could generate calorie surpluses, while technologies of violence allowed these farmers to conquer others.

  • At the same time, roaming bandits became viable too. The unconquered people would rather raid the farmers with their horses and iron weapons than do the farming themselves.

  • The bigger the empires, the harder to maintain their cohesion, and they would fall apart.

Prophets would witness these problems and propose solutions that had to be moral because the problem was of social coordination.

As nomad military superiority forced agrarian states to scale up to resist pressure from the steppes, one cultural mechanism for holding together ethnically diverse people in new mega-empires was the presence of unifying, ‘meta-ethnic’ (supranational) ideologies, such as Zoroastrianism in the Achaemenid empire, Buddhism in the Maurya empire, and Confucianism in the Han empire. Turco-Mongolian nomads (perhaps going as far back as the Xiongnu) had their own integrative meta-ethnic religion, Tengrism, although it is not usually viewed as a world religion.—Peter Turchin

Alas, although Zoroastrianism is productive software, that doesn’t make it everlasting: It doesn’t really focus on acquiring believers or retaining them. The next iteration would improve one of these aspects.

v3: Judaism

User's avatar

Continue reading this post for free, courtesy of Tomas Pueyo.

Or purchase a paid subscription.
© 2026 Tomas Pueyo · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture