# The brain is a machine that runs an algorithm

Some people say “the brain is a computer”. Other people say “well, the brain is not really a computer, because, like, what’s the hardware versus the software?” I agree: “the brain is a computer” is kinda missing the mark. I prefer: “the brain is a machine that runs an algorithm”.[^y39vgb38d0j]

* * *

**Here’s a mechanical adder**:

What’s “hardware versus software” for a mechanical adder? The question is nonsense.

A mechanical adder is not “a computer”, analogous to a MacBook. Rather, it’s a machine that runs an algorithm. (Namely, the binary addition algorithm.)

And the brain is likewise a machine that runs a (much more complicated) algorithm.

* * *

***“A machine??”***, you say. Yeah, you heard me. A machine. An extraordinarily complex machine, but a machine all the same. If you could zoom in enough to really see it, it would just be obvious! You should pause here to marvel at some molecular simulations of cell biology in action: [DNA replication](https://youtu.be/WFCvkkDSfIU?si=3aTUYYgBDIklTW-E&t=220), [more crazy DNA stuff](https://x.com/Andercot/status/2016915660979265891?s=20), [kinesin](http://youtu.be/y-uuk4Pr2i8), and so on.

…And what else would you expect? We live in a universe that follows orderly laws of physics.[^l8hbulr4wy] And the laws apply to our bodies and brains just like everything else. After all, scientists have been measuring cells, including neurons and synapses, for a very long time, and everything they’ve found has been compatible with the normal laws of physics and chemistry, chugging along in a clockwork universe.

* * *

***“An algorithm??”***, you say. Yeah, you heard me. An algorithm. An extraordinarily complex algorithm, but an algorithm all the same. And the mind is part of that algorithm, i.e. a thing that the brain does.

What algorithm exactly? It’s as yet unknown to science. But it’s evidently an algorithm that helps animals survive and thrive by navigating their environment, anticipating danger, noticing opportunities, skillfully controlling their muscles, and so on.

* * *

***“Well, the brain is not JUST a machine that runs an algorithm,”*** you say. Yeah sure. I oversimplified. The brain is also [a gland](https://en.wikipedia.org/wiki/Supraoptic_nucleus). The brain is also a [blood osmolality sensor](https://en.wikipedia.org/wiki/Osmoreceptor). It’s a [light sensor](https://en.wikipedia.org/wiki/Photoreceptor_cell). It’s a [muscle contractor](https://en.wikipedia.org/wiki/Motor_neuron). In other words: it has input channels and output channels—sensors and actuators.[^kin3qcdikvq] These are indeed parts of the nervous system, and they are critically important.

…But they add up to ≈0.2% of the central nervous system.[^k6vni4e5q9f]

What’s the other 99.8% of the brain doing? Well, it’s a machine that runs an algorithm.

* * *

***“No, I mean, you can’t reduce the brain to a mere machine that runs an algorithm,”*** you say. Who said anything about “reduce” and “mere”? You don’t have to be any less blown away by what the brain can do; instead you should be *more* blown away by the things that can be done by a machine that runs an algorithm.

Remember, there are infinitely many algorithms. They do all kinds of things. If, when you hear “algorithm”, you’re imagining lookup tables, and LLMs, and the procedure for calculating income tax, then you have still barely scratched the surface of the infinite variety of all possible algorithms.

* * *

**Matthew Cobb’s book **[***The Idea of the Brain***](https://www.goodreads.com/book/show/51719771-the-idea-of-the-brain) notes that the brain has historically been analogized to a hydraulic system, or to a telegraph network, or to a telephone exchange; today it’s often analogized to a supercomputer; and in the future, who knows. His suggested takeaway is: neuroscientists have never known how to think about the brain, and are grasping at straws.

But that’s the wrong takeaway. The brain is a machine that runs an algorithm. Many people throughout history have grasped that idea, at least intuitively. And they’ve tried to explain that idea by analogizing the brain to other machines that can run algorithms, of which there are many: clockwork, hydraulics, telephone exchanges, silicon chips, and more. All the analogies through the ages are pointing to a single, consistent, profound truth.

* * *

***“But mind is different from matter,”*** you say. Sure. An algorithm is different from a machine that runs that algorithm. If a silicon chip is running quicksort, the silicon chip does not thereby *become* quicksort.

Mind is an aspect of the algorithm that the brain runs. It’s a thing that the brain *does*, when the brain is working properly.

* * *

***“But what about noise, randomness, and continuous (not discrete) quantities?”***, you say. Well, what ABOUT noise, randomness, and continuous quantities? Algorithms are allowed to incorporate all those things! For example, [Markov Chain Monte Carlo (MCMC)](https://en.wikipedia.org/wiki/Markov_chain_Monte_Carlo) centrally incorporates randomness—and MCMC is, last I checked, an algorithm. [Newton’s method](https://en.wikipedia.org/wiki/Newton%27s_method) involves continuous quantities, and that’s an algorithm too.

* * *

***“But what about embodiment?”***, you say. Well, what ABOUT embodiment? Algorithms are allowed to have inputs and outputs!

* * *

***“But what about the brain rewiring itself?”***, you say. Well what ABOUT the brain rewiring itself? Algorithms are allowed to do different calculations under different circumstances! See [§2.3.3 of my Intro series](https://www.lesswrong.com/s/HzcM2dkCq7fwXBej8/p/wBHSYwqssBGCnwvHg#2_3_3_Learning_from_scratch_is_NOT_the_more_general_notion_of__plasticity_), where I discuss the relationship between “brain plasticity” and “mutable variables”.

* * *

***“An ‘algorithm’ can be anything, so your claim is vacuous,”*** you say. No. It’s definitely substantive.

As I mentioned above, 0.2% of the neurons in the human central nervous system are at least partly devoted to physical / chemical input and output—light detection, muscle contraction, etc. The other 99.8% are not. What I’m claiming is that you could (in principle) throw out that 99.8%, and instead connect that 0.2% to an external computer via some futuristic sci-fi radio input-output interface. I’m claiming that: if that computer was sufficiently fast, and if it was running just the right program, this 0.2%-brained human would be just as competent and genetically fit as they’d be with 100% of their neurons.

*You cannot say this about the spleen.* If you had a futuristic sci-fi radio interface to an external computer, you would not be able to scrape out 99.8% of the cells in an animal’s spleen, install the radio links, and have the animal wind up with high inclusive genetic fitness. Ditto with lung cells, muscle cells, and every other organ in the body.

The brain is a machine that runs an algorithm. An algorithm is about information processing. A sufficiently fast computer can (in principle) do that same information processing (cf. [Turing completeness](https://en.wikipedia.org/wiki/Turing_completeness), [Church–Turing thesis](https://en.wikipedia.org/wiki/Church%E2%80%93Turing_thesis)), and hence substitute for 99.8% of the brain. But computers cannot concentrate urine, nor produce stomach acid, nor grind food, nor shuttle oxygen from the air to the bloodstream. The brain is a machine that runs an algorithm, whereas other organs are not.

* * *

**The hilarious irony of psychedelics** is:[^my3tgunqlr]

Objectively, psychedelics should be the most clear-cut evidence you could imagine for the idea that the brain is a machine that runs an algorithm, and that the mind is something that this algorithm does. After all, these tiny molecules, which *just so happen* to lock onto a widespread class of neuron receptors, create seismic shifts in consciousness, beliefs, perceptions, and so on.

…And yet, the people who actually take psychedelics are much likelier to *stop* believing that. Ironic. 

* * *

***“But what about free will? And consciousness?”,*** you say. Oh jeez, this is getting outside the scope of a quick sassy little blog post. See my book-length discussion at: [Intuitive Self-Models](https://www.lesswrong.com/s/qhdHbCJ3PYesL9dde).

[^y39vgb38d0j]: UPDATE 2026-02-22: A commenter informs me of some relevant CS jargon:What normal people call “a computer” (the thing with hardware & software & chips) corresponds to the jargon term “electronic programmable computer”.The thing that I’m calling “a machine that runs an algorithm” (e.g. the mechanical adder just below, gear-based mechanisms in watches, special-purpose ASICs, etc.) corresponds to the jargon term “computer”.So I endorse “the brain is a computer” according to a specific obscure jargon definition of “computer”, but not according to how normal people use the term “computer”. For the purpose of this post, I’m sticking with more familiar terminology.  

[^l8hbulr4wy]: “The Standard Model of Particle Physics including weak-field quantum general relativity (GR)” (I wish it was better-known and had a catchier name) appears sufficient to capture everything that happens in the solar system (ref). Nobody has ever found any experiment violating it, despite extraordinarily precise and varied tests. This theory doesn’t capture everything that happens in the universe—in particular, it can’t make any predictions about either (A) microscopic exploding black holes or (B) the Big Bang. Also, (C) the Standard Model happens to include 18 elementary particles (depending on how you count), because those are the ones we’ve discovered; but the theoretical framework is fully compatible with other particles existing too, and indeed there are strong theoretical and astronomical reasons to think they do exist. It’s just that those other particles are irrelevant for anything happening on Earth—so irrelevant that we’ve spent decades and billions of dollars searching for any Earthly experiment whatsoever where they play a measurable role, without success. Anyway, I think there are strong reasons to believe that our universe follows some set of orderly laws—some well-defined mathematical framework that elegantly unifies the Standard Model with all of GR, not just weak-field GR—even if physicists don’t know what those laws are yet. (I think there are promising leads, but that’s getting off-topic.) …And we should strongly expect that, when we eventually discover those laws, we’ll find that they shed no new light whatsoever into how brains or minds work, beyond what’s already clear from the not-quite-complete laws of physics that we know today—just as we learned nothing new about brains or minds from previous advances in fundamental physics like GR or quantum field theory. 

[^kin3qcdikvq]: If you really want to be pedantic, the brain is also a weight that makes head-butts more forceful, and the brain is also a space heater, … 

[^k6vni4e5q9f]: …By neuron count. Specifically, in the human central nervous system, the neurons doing physical / chemical input and output to non-brain parts of the body consist mostly of our ≈200 million retinal cells, along with a (comparatively) much smaller number of motoneurons and other odds and ends, as far as I can tell. 

[^my3tgunqlr]: This section is parroting something I read once, but I can’t remember the source.