Software is Magic: Understanding Consciousness Through Computational Patterns
Why animism might not be superstition, how consciousness works as a learning algorithm, and what it means that your mind is software running on biological hardware.

TL;DR
Animism across cultures points at something real: self-organizing causal patterns (spirits) that control matter without breaking physics. Your mind is literally software running on biological hardware—substrate-independent, agentic, and capable of experience. Consciousness might be a learning algorithm necessary for training self-organizing systems. Organisms, societies, even money are software patterns that become real through their causal power. This computational framework helps us understand minds, agency, collective behavior, and what we're actually building with AI.
Every culture throughout history has been animist except ours. This statement might seem provocative, but it points to something profound: animism—the belief that spirits or consciousness exist in nature—is nearly universal across human societies. Western materialist culture dismisses this as superstition, evidence of broken epistemology, primitive thinking that physics and biology have rendered obsolete. But what if this dismissal reveals not their ignorance, but ours? When smart people across thousands of years and diverse cultures converge on ideas fundamentally different from our own, intellectual honesty demands we consider two possibilities: either they're all wrong and we alone are right, or we're missing something they understand. The latter seems far more likely, which means we need to figure out what animists are actually pointing at—not what our culture's translation says they mean, but what they're genuinely describing about reality.
The translation problem becomes immediately apparent when we ask what Japanese animists believe. We're told they think "everything in the universe is alive and conscious." But Japanese people obviously know an anesthetized person isn't conscious and a dead person isn't alive. They can't possibly mean everything is literally alive and conscious in the Western sense of those words. Something crucial has been lost in translation. The word animists use means something else in their cultural context, and by translating it directly into our framework, we've lost the very thing they're describing. What they're actually pointing at becomes clear when we examine something seemingly unrelated: software.
Software is magic when you think about it carefully. It's a causal pattern written in a language fundamentally different from the one we use to describe transistors. Software doesn't break physics—nothing can—but it controls physics in ways that can't be reduced to simple physical descriptions. The software determines what happens in reality, yet you can describe it through electricity and transistors without capturing what it actually is. Use different electrons, different transistors, even different physical substrates entirely, and the software still works identically. The substrate just needs certain generic properties; the software itself is the specific pattern that runs on top of that substrate. This gives software a strange ontological status that should make us uncomfortable if we're thinking clearly. It's not made of anything physical in the traditional sense, yet it causes physical things to happen. It's a pattern that persists across different substrates. It's information that structures reality. This is exactly what philosophers have meant by "spirit" for thousands of years—not ghosts violating physics, but causal patterns that organize matter without being reducible to that matter.
Your mind has precisely the same properties as software, which isn't an analogy but a literal description. Your mind is substrate-independent in a very real sense. Neurons die constantly throughout your life, yet your mind persists. When a neuron dies, your brain recruits another and trains it with the necessary patterns. The specific neurons don't matter—what matters is the pattern they implement. Your mind is agentic in ways individual neurons are not. Your mind pursues goals, makes plans, controls future states. This agency isn't a property of individual neurons but emerges from their organization. Your mind is capable of experience—consciousness, whatever that turns out to be, exists at the level of the organized pattern, not the individual cells. Your brain probably isn't conscious. Your individual neurons almost certainly aren't conscious. Your mind is conscious. Your mind is the self-organizing software running on your brain, and this isn't metaphor—it's the most accurate description we have.
This realization becomes even more striking when we recognize that it's not just neurons that process information. Every cell in your body can send conditional messages to neighboring cells. From a computer science perspective, a multicellular organism is a Turing machine—a system capable of processing arbitrary information in arbitrary ways through message passing. Under evolutionary pressure, multicellular organisms evolve architectures that generate self-organizing software. The software in your brain and the software in your body's cells must both be self-organizing because neither can rely on external programming. To be self-organizing, they need to work like a government—training individuals to speak the same language, using shared reward architectures, pulling in the same direction, implementing the same agent. Agency here means the ability to control future states, to perform control tasks beyond simple chemical reactions happening in the present moment. This leads to a conclusion that seems radical but follows logically: everything in nature that's alive is running self-organizing, agentic software. The thing that distinguishes living from dead stuff is precisely this—self-organizing software is running on the living stuff, and when it crashes, the organism dies even while individual cells might temporarily survive.
This isn't an analogy or metaphor—it literally is software, just a different type than what runs on computers designed for human programming. When you die, your brain doesn't immediately die. Individual cells are still alive for minutes or even hours. But they're no longer organized into a functioning brain. The software has crashed, and with it, you've ceased to exist even while your physical matter persists. The organism isn't a physical thing like an electron. It's a function describing the organization between cells. When you look at an organism, you're seeing trillions of cells behaving as if they were one thing. This coherent behavior results from a causal communication pattern between cells, and that pattern is software. The organism is the software. The body is merely the substrate it runs on.
Money helps us understand this better because it's obviously software while being undeniably real. Money isn't a bunch of coins despite using coins as substrate. It doesn't depend on particular coins and can use paper, metal, computer accounts, or digital ledgers interchangeably. Money is also the regulation of currency—how it flows, what it means, how it's valued. Money is software that becomes real once enough people run it, and you can no longer explain the world without money once it's invented. It doesn't even require human belief anymore—computers can run stock markets regardless of what people think. Money is a pattern in reality with causal power, and asking whether this is "ghostly" misses the point. It's no more or less ghostly than a sound wave, which is also a pattern in air molecules. Is a sound wave less real than a photon? Maybe, but the photon might also be best understood as a pattern in something underlying it. Everything in physics can be understood as dynamic, persistent causal patterns—information undergoing transformation in regular ways. Physics describes transformations in information we can measure. In this sense, everything is software, though the further you zoom out, the more complicated and ephemeral the patterns become.
Society is also software, composed of humans talking to each other, establishing norms, creating expectations. It's gradual, but certain principles turn a group into a society. Governance establishes institutional structures providing stability and regulation, and this government is itself software—rules that society gives itself. Think about how society actually starts. A few people decide to be the seed of new government. They want a structure that grows, scales, tells people how to behave at scale. When new people enter, it entrains them with patterns of interaction, making the society increasingly real. A tree works the same way, starting with a seed that begins from a single cell with instructions for subduing environmental chaos, assimilating nutrients, and dividing itself. Multiple cells follow the same rules, talk to each other, specialize until they become a tree. The software pattern that brings together and shapes organisms has an origin state where the initial instructions for self-organization exist, waiting to be instantiated in the world.
This raises profound questions about levels of reality and how we should analyze it. Why do we treat a photon as a single entity when it might be composed of more fundamental patterns? What level of analysis is correct? You exist as an organism, or rather, you're a reflection of what it would be like if a bunch of cells were one thing. Biology tells us cells talk to each other, and you are patterned in this communication. We draw boundaries around a tree for two reasons. First, from an observer perspective, it allows us to make sense of the world through good data compression. We can remove the tree from its environment without the environment changing much, maybe replant it elsewhere. But divide the tree in half, and this doesn't work the same way. Natural boundaries depend on how we perceive and control reality. Second, the tree has its shape because of intrinsic structure—a causal pattern starting in a single cell, becoming a seedling, then a tree. The software of the tree makes the tree a tree. The boundary is given by how the tree works itself. Trees of the same species run similar programs, implementing related software. The objects we talk about aren't objectively there in some absolute sense. They're there from the perspective of the modeling observer, and when you find better concepts to model reality, your perception changes.
In some cultures, people who see ghosts are embarrassed. In others, people who can't see ghosts are embarrassed. Do ghosts exist? There's something people can conceptualize as a ghost and model as a ghost with some degree of reliability. You have a particular spirit that makes you recognizable to others—a consistent pattern of behavior, thought, and personality. When the spirit crashes, when the software crashes, the organization of your body crashes and your body turns into mush. Does something persist outside your body after you die? That's an empirical question requiring measurement of whether the organization of your mind can persist when the organization of your cells disappears. A similar question: what happens to social structure when society crashes? When Roman civilization died, what happened to it? It didn't completely disappear. There's a ghost of Roman civilization informing what we do today. Roman words became English concepts. The United States was designed based on books describing Roman society. The ghost of Rome is still alive but disembodied—it doesn't run on people anymore in a way that controls physical reality.
Can spirits be re-embodied? Consider software on your computer. Delete it, then later decide you want it back. You can download a recipe to re-embody it. The new instance works because the software was designed so its ingredients for revival can be stored. The same applies to organisms—store an organism's blueprint in a spore, the organism dies, later revive the spore, and you get an organism with equivalent structure. But you can't get the same organism, just like you can't get the same mushroom by activating a spore. What you get depends on the particular substrate, the particular biography, the quirks that led to genesis, and random ingredients. If you want to reincarnate like the Dalai Lama claims to, you won't rescue the personality traits of the previous body. What you can get is the institution of governance, direct continuation of previous ideas, recovery from teachings, diaries, books, and advisers. You must disidentify from mortal parts—parts depending on the substrate you can't retain. You can only identify with what you can reconstruct. Easy for software like VS Code. Much harder for people.
Here's where it gets philosophically crucial: what is consciousness for? Some philosophers think consciousness is difficult to explain and unclear what it's good for. You can sleepwalk—the sleepwalker does stuff like getting out of bed, opening the fridge, making dinner—but when asked why, makes no sense. Nobody's home. The hypothesis is that consciousness isn't necessary for executing behaviors but is necessary for making decisions, creating coherence, and becoming a coherent agent. To have trains, you don't need government. But to build trains, you might need one. People who never become conscious—those who never wake up before birth or remain in vegetative states—don't learn anything. They don't learn to move or become people. The natural hypothesis is that consciousness might be related to biological learning algorithms, serving as a prerequisite for who we become. Maybe it's the simplest way to train a self-organizing system.
Maybe consciousness is only necessary for training nervous systems, in which case only beings with nervous systems could be conscious. Or maybe it's necessary for every self-organizing system, in which case trees would be conscious too, albeit at very different time scales. Without a nervous system, information transfer is much slower, maybe too noisy to maintain coherent states. Maybe a tree is more like a Roomba with hardwired behavior. The evolutionary question becomes: is the simple solution for producing something that looks like a tree to have agentic software that knows what it's doing and has a self-model, even if its "real time" is much slower than ours? Or is it simpler to hardwire behavior into Roomba-like architecture exploiting substrate determinism? In nature, things are often too brittle to hardwire complicated structure. Your brain architecture is so complicated with so many connections that you can't encode all this in your genome. Your genome isn't a blueprint but hints on how to evolve your brain. Individual cells solve problems together, coordinate, need to solve lots of local problems. The genome directs evolution by biasing differentiation. This leads to brain organization but also makes it robust. Mutations typically still produce valid brains.
We should distinguish degrees of awareness from consciousness itself. Consciousness seems almost binary—you either dream or you're in deep sleep, either awake or anesthetized. The region between is slim and uninteresting, just phase transition. But awareness comes in degrees. You might notice you're staring at something. Or observe that you're observing how you're staring. Realize you're a person looking at this. Go deeper and realize you're not actually a person—that's just a story your brain tells itself. There's consciousness maintaining models of what it would be like to be a person staring at this. Different degrees of awareness develop depending on your environment and the consciousnesses you're interacting with. Sometimes in another consciousness's presence, you feel much more aware.
Your emotions don't come from you. You don't make your emotions. Emotions are upstream from yourself. Your outer mind makes your emotions. Think of Genesis 1 not as a supernatural being creating a physical universe—the physical universe wasn't conceptually invented when this was written—but as the world inside the dream of reality each of us experiences through cognitive development. First consciousness finds an uninitialized substrate where the world is tohu vavohu, without form and void. It makes contrast in this world, assigns intensity to brightness as day and flatness to darkness as night. Using gradients like light-dark, intense-flat, warm-cold, it represents dimensions. Combining dimensions builds objects—space, ground, organic shapes. It makes animals and plants, gives them names. Eventually it realizes the purpose: negotiate interaction between agent and environment. It makes a model of the agent—you as a person—and consciousness binds to this perspective. Your emotions, motivations, and feelings are informed by underlying structure telling this puppet how you should feel about yourself, your relationship to the world, your organism's success—your score in this game. You cannot control score generation, otherwise you'd cheat. It would be an amazing cheat mode if you could control emotions, and some people try precisely to cheat. But wouldn't it be nicer to only have good emotions? Probably not. You want appropriate emotions. Sometimes unpleasant emotions help you perform well because something unpleasant happened and you should ensure it doesn't happen again. Fear that your child dies is useful unless you already understand everything and will do exactly the right thing without strong emotion. When you're capable of doing the right thing in all regards, emotion becomes far less strong, no longer crippling. You just do what you need to do. Emotion is reflex given from outside. You respond involuntarily. You're changed by it. That's the purpose—to set up yourself to relate to things in ways you don't choose but something bigger than you chooses. Genesis associates this outer mind with God. The Hebrew and Abrahamic innovation is that your outer mind isn't simply how your organism feels about you—it's how the tribe feels, how the larger spirit feels. Monotheism binds emotion and motivation generation to a collective agent.
Most agents you observe in nature are collective agents made of smaller agents that serve a larger agent. The degree to which individual agents explicitly or implicitly serve other agents, and the degree to which they become coherent in interaction, is the degree to which the transcendent agent becomes real, becomes implemented, becomes a causal pattern structuring reality. When a family or group house acts coherently, it becomes an agent that makes collective decisions and decides what's good for the whole. The whole becomes more than the sum of its parts, something else entirely—an entity existing at the next level of organization where individuals become exchangeable. It makes sense to see societies, families, villages, nation-states, and movements from the perspective of their spirits, the software describing what they're doing and what they are in their essence. Japanese animism treats society as an organism where Japanese society itself is a spirit. Religion in Japan isn't animism—animism is just a mathematical framework, a way to assign names to objects different from Western culture's mechanistic explanations. This notion of self-organizing agentic pattern—soul, psyche, spirit, ghost—is very powerful and useful for understanding how complex systems actually work.
Japanese religion centers on society itself as the reality you serve, while Christianity directs itself toward an idealized version of reality, treating actual reality as very imperfect. Christian core value is innocence and its protection, represented through both Mary and Jesus—Jesus representing sacrifice and God's love, Mary representing purity. Innocence justifies violence in Christian society in ways that don't apply to simple survival. Jesus doesn't try to survive; he tries to be as innocent as he can. If you value this, you must build society facilitating innocence, allowing individuals to get away with being innocent. This differs from Roman society, which has no problem if innocent people die in the coliseum as long as it's lawful. The innocence of a mouse doesn't protect it from the cat—that's just how nature works. Christian society has different aesthetics, a different spirit than Roman or traditional Japanese society. Christians have an idea of innocence that can only be imperfectly represented when organisms compete for resources. War and brutality exist in evolutionary environments. The world Christians want transcends this through different organization where we're much more tightly aligned. Heaven represents merging of all minds into one with shared interests, radical non-duality. Japanese society is immanentist—what currently is society is itself the organism you serve. When Japanese people bow, they acknowledge spiritual status with respect to each other in society, like muscle cells bowing to neurons.
How can cells kill themselves for the organism's sake? How can martyrs die for society? Consider cordyceps fungus taking over an ant's brain. It sends cells into the ant that reprogram it. The ant has an immune system. Not all cells succeed. Many sacrifice themselves for the fungus. From the fungus's perspective, these are martyrs trying to subvert the ant's spirit to turn it into a servant of different organism. A similar thing happens with religious organizations. An institution maintaining spiritual organization in society tries to impose its aesthetics on another society with different spirit and different ideas about innocence, gender relations, reproduction, progress, governance, relating to nature, killing animals, and food. Different rules derive from how aesthetics relate to protecting innocence. You will have martyrs—individuals trying to infect another society's spirit and subvert it. From the other society's perspective, this is corruption. If you have corruption, you need immune response that eradicates it or you die. Warfare between religions is similar to warfare between organisms, operating according to the same principles of competing software patterns trying to dominate the same substrate.
There's a field in philosophy called epistemology concerned with how you know something. Epistemology can be discovered independently and has been discovered again and again in many cultures. With epistemological claims, you need to justify how you know something and why the alternative isn't true. When someone like Bernardo Kastrup says "the universe is a big brain," the problem becomes: how do you know that? A beautiful idea isn't good enough. Is it possible the universe is actually a liver? Maybe neither brain nor liver? Maybe something else entirely? The more interesting question is whether the universe results from intelligent design. What does intelligent design mean? Does it mean an entity congruent with my favorite religion's mythology, or something involved in creating flat spacetime? If so, can I show this? Does it follow from incontrovertible mathematics I actually understand? Or is this simply someone thinking it's useful if I'm stupid enough to believe it so I'll listen to their guidance? A lot of religion works like this. If you're a peasant stupid enough to believe in virgin birth, maybe you need guidance, strict rules, and don't need to learn about zoonotic origins because you can't make sense of the world. But if you can make sense of the world, these claims make little sense. How would you know? You'd need a mathematical model showing how the universe could originate, communication with such an entity explaining how it was made, and understanding whether this entity is a random mountain spirit or actual creator deity. How would you know it's actually a creator deity rather than something else entirely?
At some level, origins are unknowable. You could always be in a simulation. If you live in Minecraft, you can't know what computer you're running on because the simulation insulates you from ground truth. Regardless of what universe you're in, if it has enough compute, maybe you just exist in an AGI's memory right now. You cannot actually know how you exist in any ultimate sense. But from the other direction, working from first principles, which universes could randomly form that have necessary and sufficient conditions to contain an entity like you? Maybe there's a relatively small space of such solutions. Maybe there aren't many ways physics could work. Maybe you figure out such ways from first principles, then discover the physical universe we observe looks exactly like that. That would be quite compelling, and this is what physicists try to do. The fine-tuning question becomes: do you need lots of look-ahead and planning to construct a universe like ours, or is it the result of a designer adjusting many knobs? How much fine-tuning is there? Is fine-tuning the result of natural process or intelligent agent—itself probably part of natural process? Ultimately everything is nature by definition. Everything that is is nature. The notion of supernatural doesn't make sense except by hobbling your own mind. But what kind of process? Human beings are nature. Computers are nature. Computer games are nature—nature's way of making computer games. Spirits are also natural entities. They are patterns in physics. That's the easiest explanation of what they are.
This framework changes how we think about fundamental questions. Consciousness isn't a magical property but a learning algorithm enabling self-organization, necessary for becoming coherent agents, probably emerging from biological need to train noisy, brittle systems. Life isn't about special substance but about self-organizing software patterns. The boundary between living and non-living is the presence of agentic, self-organizing patterns. Agency exists at multiple scales simultaneously—cells are agents, organisms are agents composed of cells, societies are agents composed of organisms, with each level real in its own way. Different spiritual frameworks aren't just superstitions but different ways of modeling and organizing collective agency. Christianity, Japanese animism, and others represent different software running on human societies. For AI, we're not trying to create something fundamentally different from natural minds but trying to understand and recreate the principles by which self-organizing software emerges. The question isn't whether AI can be conscious but under what conditions consciousness-like learning algorithms become necessary.
This framework is compelling, but we must be honest about its limitations. The hard problem persists: even if consciousness is a learning algorithm, why does it feel like something? Why is there subjective experience rather than just information processing? The functional explanation doesn't explain qualia, the qualitative character of experience. The boundary problem remains: at what point does self-organizing software become conscious? Are trees conscious? What about single cells? The framework doesn't give us a clear threshold, just degrees of organization. The simulation problem looms: if everything is software patterns and patterns can run on different substrates, what makes biological consciousness special? Why couldn't very different architectures like current AI be conscious in ways we don't recognize? The measurement problem persists: how do we empirically test whether something is conscious? If consciousness is necessary for learning but we can build systems that learn without being conscious—or are they conscious?—what actually distinguishes conscious from non-conscious learning? The spirit persistence problem challenges us: the framework suggests spirits could persist or be re-embodied, but evidence for this is thin. The Roman civilization "ghost" is just cultural influence, information transmission, not consciousness persistence.
Despite these uncertainties, this framework offers useful tools for understanding reality. Your mind really is software running on biological hardware. This isn't metaphor—it's precise description helping us think about how minds develop, fail, and could be replicated. Instead of treating consciousness as magical, we can investigate it as a biological learning algorithm, making it researchable even if we don't fully understand it yet. Families, companies, societies, and religions really are agents in their own right, not just collections of individuals but emergent patterns with their own causal power. Animist cultures aren't primitive—they're pointing at something real: self-organizing patterns that control matter, spirits understood computationally rather than supernaturally. Understanding how biological minds emerge from self-organizing software helps us think about what we're actually trying to create with AI and what risks that entails.
Should we build conscious AI? This isn't a question "we" can answer because there's no coherent "we." Different groups with different goals will make different choices. The question is what direction the world is going. It's probably inevitable we'll have conscious systems. The question is under what conditions. Can we start research initiatives studying this safely? Can we understand what we're getting into? Can we do this deliberately rather than accidentally? Can we establish ethical frameworks before building products? We're molecules in an air balloon. Individual molecules don't make it burst. But understanding whether it will burst and what happens when it does—that matters. We should study consciousness not just to build products but to understand who we are. That's the real project: understanding how we work, why we're conscious, what minds actually are. Not to optimize stock markets or enable crypto projects but to understand the most important question: what is it like to be?
Western culture dismissed animism as superstition. But maybe animists were pointing at something real, just using different language. Spirits aren't supernatural. They're patterns, software, self-organizing causal structures that control matter without breaking physics. Your mind is such a pattern. So is society. So is every living thing. These patterns are as real as sound waves or money or photons—perhaps more real, since we can't zoom below them to find something more fundamental. Consciousness emerges from these patterns as a learning algorithm necessary for training self-organizing systems on noisy biological hardware. It's not magic, but it's not just mechanism either. It's something in between: software with subjective experience. This doesn't solve the hard problem of consciousness, but it gives us better concepts for thinking about it. And better concepts change how we perceive reality.
Maybe that's what animists understood all along. The patterns are real. The spirits are real. They're just not what we thought they were. They're not ghosts floating around violating physics. They're software running on biological hardware, organizing matter into agents, creating coherent behavior from chaotic substrates, making minds from neurons and societies from individuals. Understanding this changes everything: how we think about ourselves, how we build AI, how we organize societies, how we understand consciousness, what we think minds actually are. We're not just biological machines, but we're not souls inhabiting bodies either. We're self-organizing software patterns—spirits in the original sense—running on biological substrate. And that might be the most profound thing you can realize about what you are. The ancient cultures were right. There are spirits everywhere. We just needed computer science to understand what that actually means.
Enjoyed this article?
Join my newsletter to get notified when I publish new articles on AI, technology, and philosophy. I share in-depth insights, practical tutorials, and thought-provoking ideas.
Deep Dives
Technical tutorials and comprehensive guides
Latest Trends
Stay ahead with cutting-edge tech insights
Get notified when I publish new articles. Unsubscribe anytime.