Bell's Inequality - Guide and Walkthrough
Version: 1.01 | Updated: 11/28/25
Note: this is my last post about Q-UP. After this, Donkeyspace will return to its traditional subjects - neoism, meta-rationality, and fractals.
One of the things I love about making video games is that they are an omnivorous hole that will absorb an infinite variety of subjects, themes, and ideas, reliably turning them all into the same thing - a video game. According to my friend Bennett Foddy, this is because video games are the terminal artform, something like Wagner’s all-consuming Gesamtkunstwerk but with even more space marines.
As everyone knows, Q-UP (available now) is a game about esports, software development, animal welfare, and hacking your own reward function. But what you might not know is that it was partly inspired by my obsession with Bell’s theorem, aka the Bell inequality. Bell’s theorem may be the single most important idea in the history of science. I know it sounds like an exaggeration, but I’m 100% serious. Don’t just take my word for it…
These guys got the Nobel prize “for experiments with entangled photons, establishing the violation of Bell inequalities and pioneering quantum information science.” It’s a long story, but basically they were confirming, for once and for all, the idea Bell had in 1963 — that no version of quantum mechanics would ever solve the “spooky action at a distance” problem, that the universe was fundamentally non-local, and that this was something you could demonstrate experimentally.
What does it mean for the universe to be be fundamentally non-local? It means that there are certain relationships in nature that aren’t affected by distance. Like me, you probably have a vague sense of the universe being, at its lowest level, some kind of more-or-less empty space in which things exist and events occur. It turns out that this is not the case.
A pair of entangled particles that are light years apart have a relationship such that things that happen to either one of them are, in a sense, happening to both of them. This relationship isn’t ordinary cause and effect, there’s no force or information or influence traveling between the particles, it’s almost like the pair of particles is one thing, and that thing isn’t located in space, there is no between.
This strange space-defying relationship isn’t some rare occurrence that occasionally happens at the edge of reality. It is the ordinary state of all matter. You and everything around you are made out of particles that are entangled in just this way.
One way to think of the universe being non-local is by analogy to the earth being round. The world around us looks flat, but with the right kind of observation we can see that it isn’t. The universe looks spatial to us, but with the right kind of observation we can see that it isn’t. This fact is so fundamentally counterintuitive that, even among physicists, there remains wide-spread disagreement about its meaning and ramifications. But that it is a fact is indisputable. This is the legacy of Bell’s inequality.
And the standard way of explaining Bell’s inequality is as a game.
The Beginning - EPR
In the 1930s, Albert Einstein was troubled by two related aspects of quantum mechanics. First, indeterminism — QM describes matter in terms of probabilities instead of definitive properties. Second, non-locality — QM implied connections that traveled faster than light, violating the universe’s unbreakable speed limit. In 1935, Einstein, along with Boris Podolsky and Nathan Rosen, published a paper arguing that quantum mechanics must be incomplete. The paper used a thought experiment with two entangled particles as evidence for this claim. According to the EPR paper, while QM treats properties like momentum and position as probabilities, under the hood, these properties must have actual definite values; just like temperature is a way of talking about the average kinetic energy of a bunch of atoms but under the hood the atoms actually have definite energy levels that you can observe and measure. These presumed underlying values are referred to as “hidden variables”. The EPR paper uses the non-local relationship between two entangled particles to say: “See? If quantum mechanics was a complete description of nature you would get this paradoxical result, therefore it must be incomplete.”
Bell’s Breakthrough
Three decades later, John Bell was thinking about quantum mechanics in a different context. Einstein was dead, and his objections to quantum mechanics had been largely forgotten in light of the theory’s massive, unbroken success. Whatever qualms or questions one might have about its implications, the theory had been experimentally confirmed beyond any shadow of a doubt. The prevailing orthodoxy was the Copenhagen interpretation — “shut up and calculate” — science’s job was to provide accurate predictions for the outcomes of technical procedures, not to give a coherent explanation of what any of it “means”.
In the midst of this, John Bell still wanted to know what it meant. He was interested in the same questions that had puzzled Einstein. Was QM incomplete? Were there actually hidden variables under the hood? Bell analyzed the work of American physicist David Bohm, which presented one possible hidden variables approach, and came to the conclusion that, even if there were hidden variables, you would still have to have non-locality. In fact, no theory that matched the results of quantum mechanics, whether it was deterministic or probabilistic, could ever be local.
Bell’s proof of this insight used a variation of the same thought experiment that was used in the EPR paper. Imagine two scientists, separated by a vast distance, so that no information or influence or effect could ever connect them. Now have them do a series of observations, each on their halves of some pairs of entangled particles. Now combine the results of those observations together using a simple mathematical formula. The final output will never exceed a particular number. This limit is Bell’s inequality, and it’s the inevitable result of there being underlying values that pre-determine the results of the observations. No matter how you assign these values they can’t exceed this limit. But, according to quantum mechanics, scientists actually making these observations in the real world will produce results that do exceed this limit.
One way to think about Bell’s insight was that he took the EPR thought experiment and treated it more like a real experiment. How would you set it up? What would happen? What was the actual range of possible results? This pragmatic nuts & bolts approach reflected his experience working at CERN, home of the world’s largest particle collider. Bell understood how to turn the idea of locality into something concrete that could be precisely tested. Ironically, this approach ended up showing that what Einstein found unthinkable was, in fact, true.
But how is any of this a game? We’re getting to that.
The CHSH Version
In 1969, Clauser (the guy in the middle picture above), Horne, Shimony, and Holt published a paper that reformulated Bell’s inequality in a way that made it cleaner and more practical. The CHSH formulation made the inequality into something that could more easily be tested with actual lab equipment. But the climate in physics was still very hostile to these kinds of foundational questions. In the early 1970s, when John Clauser was preparing to run the first experiments, the senior faculty in his department at Columbia warned him that testing quantum physics would destroy his career. Richard Feynman told Clauser he was highly offended by his impertinence, insisting that quantum mechanics was obviously correct and needed no further testing.
But Clauser was undeterred. Like Bell and Einstein before him, he wasn’t willing to shut up and calculate, he wanted to understand what was actually going on. So he set up the experiment in the sub-basement of Birge Hall at UC Berkeley and ran it. Sure enough, the inequality was violated. Einstein was wrong. Non-locality had been experimentally demonstrated.
CHSH as a Game
Over the next few decades, Clauser and other physicists continued to do more sophisticated versions of the inequality-violation experiments. Because of the deeply counterintuitive nature of the effect these experiments showed, they wanted to make sure that there weren’t any other possible explanations. Could there be something about the equipment? Something about the way the experiments were set up or run? Some secret way that the observations in the different locations could have some ordinary, local, “classical” influence on each other? The more experiments they ran, the more obvious it became that the answer to all of these questions was “no”.
Among other physicists, the reaction to these experiments was mixed, mostly negative, often hostile. There continued to be a general attitude of “Why waste everyone’s time? We know quantum mechanics is correct. These foundational questions are just philosophy, not real physics.” Because this work was inspired by EPR, and took the EPR critique of QM seriously, it was primarily seen in light of that critique’s failure, instead of for what it was — a thorough exploration of QM’s mind-blowing implications regarding the fundamental nature of the universe. What Einstein said was “If QM was true, it would imply non-locality, and non-locality is obviously crazy, so QM can’t be true.” What Bell’s theorem and the CHSH formulation did was flip that argument around: “QM is true, therefore non-locality. Holy shit!”
But there was another group of researchers who were very interested in the CHSH experiments — computer scientists. During the 80s, theoretical computer science was exploring the implications of QM on communication, computing, and cryptography. When they looked at the CHSH they saw something that looked just like the kinds of problems they were thinking about. The two scientists, separated by a great distance, making observations and comparing their results, were a lot like the two parties in a quintessential theoretical computer science problem — sending information, encoding messages, solving problems, or sharing proofs. This way of thinking about Bell’s theorem was such a good fit that, by the early 2000s it had become the de facto way of presenting it. It is now standard to talk about “the CHSH game”, using the characters developed for posing thought experiments in cryptography — Alice and Bob.
One of the reasons the game framing is such a good fit is that, going all the way back to Bell, the experiment that is being considered has an essential property: it’s important that the two scientists get to decide, however they want, which specific observations to make. The experiment wouldn’t work if the two scientists always measured the same value, up/down spin for example. In that case, the entangled particles would always have opposite results, but so what? Maybe that’s just how it was always going to turn out. Sure, the entangled pairs always have this complementary relationship, if one of them is up the other is down. But maybe when we divided up the pairs and each took half I just happened to get the up, up, down, up, down halves and you got the down, down, up, down, up ones. What’s the big deal?
The big deal happens because we aren’t limited to just observing the up/down spin. We can also choose to measure the spin horizontally. QM tells us that, if you measure your half of an entangled pair vertically, and I measure my half vertically, we will always get opposite results. But if you measure your half vertically and I measure my half horizontally, the results will be uncorrelated, and will therefore match 50% of the time. And this is true of any angle. When we measure along the same angle our results are always complementary, when we measure along orthogonal angles our results are completely uncorrelated. And all the intermediary angles give intermediary correlations — if you measure along one angle and I measure along an angle that is just slightly off from that, I’ll get results that are just slightly off from being perfectly complementary.
The fact that you are making arbitrary choices about how to measure your halves of the entangled pairs, and your choices matter for the results I see, no matter how far apart we are, that’s what makes the experiment work, that’s what demonstrates non-locality.
How to win the CHSH Game
So, here’s how the CHSH game actually works:
There are two players, Alice and Bob, and a referee.
Every round, the ref sends each player a 0 or a 1 (chosen randomly). These are called the inputs.
Then, they send back a 0 or a 1. These are the outputs.
THE RULE: If either input was 0, the outputs must match, otherwise (if both inputs were 1) the outputs must be different.
That’s it. That’s the whole game. Alice and Bob are allowed to talk before the game and can come up with any strategy they want, but once the game begins, they can’t communicate in any way.
Savvy gamers may have already thought of one possible strategy for Alice and Bob, which is to always output 0 (or always output 1). Then the outputs will always match, and we’ll win 75% of the rounds. In fact this is the best possible strategy in a classical world (a world with locality). The 75% win rate of this optimal strategy is, essentially, Bell’s inequality. There are lots of different classical strategies, and they produce a variety of win rates, but none of them ever do better than this one.
But here, in this universe, we can do better. All we need is a sequence of entangled particles, one pair for each round we are going to play. You take your particles and rocket off to a distant lab, and I’ll take mine and head off in the opposite direction to another distant lab on the other side of the galaxy.
How are these entangled particles going to help us? Remember how entangled particles work. We know that whenever we measure along the same angle we get opposite results, perfect anti-correlation. Then, if we vary our angles of measurement slightly, the anti-correlation starts to weaken. If our angles of measurement are very close, we’ll almost always get the opposite result, but not always. The farther apart we move our angles of measurement, the weaker the anti-correlation becomes, until we reach 90° apart, at which point we are completely non-correlated — we can get any combination of results, there’s no relationship at all. But we can keep going past 90°. Now the correlation starts increasing in a positive direction. Our results are becoming more strongly correlated instead of anti-correlated. We start producing the same results more often. Until we approach measurement angles that are 180° apart, at which point our results are perfectly correlated, always the same.
Think of it like this - when we measure along (roughly) the same angle, we get (roughly) opposite results. When we measure along (roughly) the opposite angle, we get (roughly) the same results.
Here’s the strategy we’re going to use to beat this game: we are each going to have two different angles we use for measuring, which we will select between based on what input the ref sends us. Then we’ll send an output back based on the result of our measurement. We’ll design these angles such that, out of the four ways these measurement angles can combine, three of them will be far apart (135° apart) and one will be close to the same (45° apart).
With these measurement angles, the top three combinations are pretty far apart and the bottom one is pretty close together. Which is just what we want according to The Rule — matching results for every case except for 1,1, where we want non-matching results. This gives us an expected win rate of roughly 85%. Unlike the classical strategy, where we win 100% of the rounds that aren’t 1,1 and lose 100% of the rounds that are 1,1; here we win 85% of the time, every round. And that’s how you beat Bell’s inequality.
What Does it All Mean?
I don’t know. But I think it’s interesting that the most important idea in the history of science is a game. And sort of a computer game, actually, or at least a game with computers in it. Bell’s inequality is even weirder than relativity, and part of the weirdness is the difference between Einstein’s stories about clocks on trains and astronauts traveling close to the speed of light and Bell’s theorycrafting about equipment and numbers. Trying to wrap your head around Bell’s inequality is a bit like trying to understand the Monty Hall problem, with its goat that is probably somewhere, but may or may not be, and what should you do if you want to win?
Relativity changed our picture of the universe, replacing the Newtonian image of a blank space in which events occur, one after the other, with the complex topology of spacetime. Bell shows us that this topology is even more complex than we thought. The very nature of physical laws themselves needs to be reconsidered. Do they operate like forces? Pushing and pulling matter into the proper arrangements? Or do they operate like the rules of a game? Like logical constraints on what is allowed?
The rules of Sudoku tell us that the number in the upper left corner of the grid can determine what the number in the lower right corner can be. This determination isn’t causal, exactly. It’s not like the upper left number exerts some force that propagates through the puzzle, affecting all the numbers in between, until it reaches the lower right square and transforms the number there. It’s more that the relationship between these two numbers is what we mean by the rule, it is both a consequence and a demonstration of it. Bell’s inequality shows us that the world is more like a logic puzzle than we thought.







I loved reading this, thank you for the walkthrough. The Sudoku analogy made the profound idea of the universe-as-game-rules click for me.
If this is what all game advertisements looked like, I'd like advertisements more. Wouldn't see as many, but I'd think they were cool as heck. Advertisements as rare bird watching.
It's a very effective way to advocate for a view, to describe a scenario where those who understand the view have clear performance advantages over those who don't, and if you strip all ambiguities and extraneous details out of such a scenario, you'll be left with a game, a decision problem that teaches efficiently through interaction. The applicability of games to natural philosophy should come as no great surprise.
Personally, I wasn't convinced there was anything to the hard problem of consciousness until I thought up a game where the player dies (at a higher rate) if they don't believe in it.
(In short, imagine that you're one of two brains, they're having identical experiences, or at least the experiences don't give away which brain they each are. At first your probability that you're one brain or the other will just be 50:50. But then it occurs to you that there are physical differences between the way these brains are implemented, and you have a deep understanding of that, so now, how do those differences affect your probability of being one brain or the other? And it becomes clear that it should affect it, but it's fundamentally mysterious as to how. It's noumenal. It turns out that in most senses there's no way to study it. But thinking about it from this angle helps the reader to move towards having a saner/less prejudiced probability distribution over how the noumena of consciousness *could* work, so there's still some value in it. Longer naratization here: https://makopool.com/mirror_chamber.html)