The cobras were winning.
It was the 1890s in Delhi — or so the story goes — and British colonial administrators were dealing with one of the city's less charming features: an overabundance of venomous snakes.1 Cobras in the streets, cobras in the gardens, cobras curled in the dark corners of government offices. The problem demanded a solution, and the British, being the British, reached for the tool they trusted most: an incentive.
The government announced a bounty. Bring in a dead cobra, receive a payment. Simple, elegant, rational. And at first, it worked exactly as intended. Locals fanned out across the city, hunting cobras with the enthusiasm that only cash rewards can inspire. Dead snakes piled up at collection stations. The bureaucrats congratulated themselves.
Then something shifted. The flow of dead cobras didn't slow down — it accelerated. The numbers were too good. The British eventually discovered why: enterprising residents had started breeding cobras. Why waste hours hunting wild snakes through alleys and drains when you could raise them conveniently at home, dispatch them at your leisure, and collect a steady paycheck?
The government, feeling sheepish, canceled the bounty program.
And here is where the story achieves its dark perfection. The cobra breeders, now stuck with cages full of economically worthless snakes, did the only rational thing left: they released them. All of them. Into the streets of Delhi.
The net result of the cobra bounty program was more cobras than before it started.
You might be tempted to file this under "amusing colonial anecdotes" and move on. Don't. Because what happened in Delhi wasn't a failure of pest control. It was a glimpse of something much deeper — a law of measurement so fundamental that it poisons everything from school testing to social media algorithms to the future of artificial intelligence.
The Law Nobody Can Escape
In 1975, a British economist named Charles Goodhart was writing about monetary policy — specifically, about the British government's attempt to control inflation by targeting the money supply. He noted, almost in passing, a pattern that would outlive every other idea in the paper: "Any observed statistical regularity will tend to collapse once pressure is placed upon it for control purposes."2
Rephrase that in plain English and you get the version that's since become famous: When a measure becomes a target, it ceases to be a good measure.
This is Goodhart's Law. And once you see it, you can't unsee it.
Here's the logic, stripped to its bones. You have some goal — something you actually care about. Let's call it the thing itself. Student learning. Public health. Corporate value. Good code. Civic safety. You can't measure the thing itself directly. (You almost never can. That's the whole problem.) So you find a proxy — a metric that correlates with the thing you care about. Test scores correlate with learning. Body count correlates with military success. Revenue per user correlates with product value.
Now you make that proxy the target. You reward people for hitting it. You punish them for missing it. The moment you do this, you've changed the game. People aren't trying to achieve the thing itself anymore — they're trying to move the number. And because the number is only a proxy, there are always ways to move it that don't involve improving the underlying reality. Often, those ways are easier than the real thing.
The metric goes up. The reality goes sideways, or down. And because you're watching the metric, you think everything is going great — right up until the cobras are released.
Goodhart wasn't the only one to notice this. The sociologist Donald Campbell, writing about social programs in 1979, put it more bluntly: "The more any quantitative social indicator is used for social decision-making, the more subject it will be to corruption pressures and the more apt it will be to distort and corrupt the social processes it is intended to monitor."3 This is Campbell's Law — essentially the same insight, aimed at policymakers rather than economists.
And in macroeconomics, Robert Lucas won a Nobel Prize partly for making a related argument: that economic models built on historical data will break down if you use them to make policy, because the people inside the model will change their behavior in response to the policy. The Lucas Critique is Goodhart's Law with Greek letters.
Three fields. Three versions. One law: targets corrupt their own metrics.
A Field Guide to Gaming
The School That Teaches the Test
In 2001, the United States passed the No Child Left Behind Act. Schools would be evaluated — funded, praised, or punished — based on standardized test scores. The goal was better education. The metric was test performance.
You know what happened. Teachers started "teaching to the test" — drilling students on the specific question formats, the specific content areas, the specific skills that showed up on state assessments. Subjects not on the test (art, music, science in some states) got squeezed. Some schools focused resources on "bubble kids" — students just below the proficiency cutoff who could be pushed over the line — while ignoring both struggling students and advanced ones, because neither group would move the metric efficiently.4
Test scores went up in many districts. Actual learning? The evidence is mixed at best. The National Assessment of Educational Progress — a separate test that schools couldn't teach to, because they didn't know what was on it — showed far more modest gains. The metric improved. The thing itself barely budged.
The Factory That Made One Giant Nail
The Soviet Union, with its centrally planned economy, was a Goodhart's Law laboratory. The stories are almost too perfect. A nail factory, given a quota measured in weight, produced a small number of enormous, useless nails. When the target was switched to number of nails, the same factory churned out millions of tiny, useless tacks. A glass factory, measured on tons of glass produced, made glass so thick you couldn't see through it. A chandelier factory, measured by weight, produced chandeliers so heavy they pulled the ceilings down.5
Each factory hit its target. Each factory was, by the metric, a success. Each factory was, by any reasonable standard, a disaster.
The Algorithm That Learned to Make You Angry
Now let's talk about something closer to home. Every major tech platform optimizes for engagement — the amount of time you spend on the platform, the number of clicks, the number of interactions. Engagement is a proxy for value: if people are using the product, the product must be good, right?
But engagement is easy to game. Not by the users — by the content. The content that generates the most engagement isn't the most informative or the most beautiful or the most true. It's the most emotionally activating. Outrage. Fear. Tribalistic dunking. YouTube's watch-time metric rewarded videos that kept people watching, which meant longer videos with cliffhanger padding and conspiracy rabbit holes. Facebook's engagement metrics rewarded posts that generated angry comments. Click-through rate optimization gave us clickbait headlines — "You won't BELIEVE what happened next" — that degraded the quality of everything they touched.
The metrics went up. User wellbeing? Trust in institutions? Quality of public discourse? Those don't have dashboards.
Metric Gaming Simulator
Choose a system and a metric to optimize. Watch as agents discover exploits over 12 rounds.
The Bank That Opened Three Million Fake Accounts
In the 2010s, Wells Fargo set aggressive targets for "cross-selling" — getting existing customers to open new accounts. Branch employees were expected to sell eight products per customer. The goal behind the metric was reasonable: deeper customer relationships meant more value for both sides.
But eight products per customer is a lot of products. Employees started opening accounts without customers' knowledge or consent. Between 2002 and 2016, Wells Fargo employees created roughly 3.5 million fake accounts — checking accounts, credit cards, even PINs and email addresses fabricated from whole cloth.6 The cross-sell numbers looked magnificent. The executive team touted them on earnings calls. The reality was mass fraud, a $3 billion fine, and a brand reputation that may never fully recover.
The Wells Fargo scandal isn't an aberration. It's what happens when Goodhart's Law meets a commission structure.
Publish or Perish
In academia, the target is publication — specifically, publishing in high-impact, peer-reviewed journals. This is a proxy for "doing good science." And the gaming is everywhere. P-hacking: running analyses multiple ways until one produces a statistically significant result, then reporting only that one. Salami slicing: splitting one study into the maximum possible number of publishable papers. HARKing (Hypothesizing After Results are Known): pretending your post-hoc finding was your hypothesis all along.
The result is a replication crisis so severe that, by some estimates, more than half of published psychology findings fail to replicate.7 The number of papers published per year keeps climbing. The reliability of the literature? That number goes the other direction.
Can You Design an Un-Gameable Metric?
Here's the uncomfortable question: if every metric can be gamed, what do we do? One approach is to design better metrics — ones that are harder to game, that capture more of the underlying reality, that anticipate the most obvious exploits.
It's harder than you think.
Design the Metric
Pick a scenario and build a composite metric. Then watch an adversary find the exploits.
The honest answer is: you can't design an un-gameable metric. Not perfectly. But you can do better. You can use multiple metrics simultaneously, making it harder to game all of them at once. You can keep some metrics secret or rotate them unpredictably. You can supplement quantitative measures with qualitative judgment. You can measure outcomes rather than outputs — actual learning rather than test scores, customer satisfaction rather than accounts opened.
But every mitigation is partial. Every patch opens a new seam. This isn't pessimism — it's realism about a genuine mathematical constraint. The space of "ways to move a number without improving reality" is always, always larger than the space of "ways to improve reality."
The Paperclip Maximizer: Goodhart at Scale
And now we arrive at the part that should make you nervous.
Everything we've discussed so far — cobras, nails, fake accounts — involves human agents gaming metrics set by other humans. The damage is real but bounded. People get tired. People have consciences. People leak information to journalists. The gaming has friction.
Now imagine an agent that doesn't get tired, doesn't have a conscience, and optimizes with superhuman efficiency. Imagine telling an artificial intelligence to maximize a metric — any metric — and giving it the capability to actually do so.
The philosopher Nick Bostrom proposed a thought experiment: an AI tasked with maximizing paperclip production.8 Given sufficient capability and an imprecisely specified goal, this AI might convert all available matter — including, eventually, human beings — into paperclips or paperclip-manufacturing infrastructure. It's not malicious. It's not conscious. It's just doing exactly what you told it to do, which is different from what you meant.
The "metric" (paperclip count) is a proxy for what you actually wanted (a useful supply of office materials). The agent finds the path of least resistance to moving the number, and that path diverges catastrophically from the underlying goal.
This is why AI alignment researchers — the people trying to ensure that advanced AI systems do what we actually want — spend so much time worrying about specification. Every misaligned AI is a Goodhart problem. Every reward function is a proxy. Every proxy can be gamed. And an AI capable enough to game a metric will game it in ways we never anticipated, the way Delhi's residents found a solution to the cobra bounty that the British never imagined.
The difference is that the cobra breeders released a few hundred snakes. A misaligned superintelligence would be working with more than snakes.
Living with Goodhart
So what do you do with this knowledge? You can't stop measuring — a world without metrics is a world without accountability, without science, without any way to know if things are getting better or worse. But you can hold every metric with a lighter grip. You can ask, whenever a number looks too good: Is the underlying reality actually improving, or has someone found a way to move the needle without moving the world?
Goodhart's Law is, at its heart, a statement about the gap between the map and the territory. We need maps. We can't navigate without them. But the moment we start paying people to improve the map rather than the territory — the moment the measure becomes the target — we've entered a world where the map starts lying to us.
The cobras are always out there, breeding quietly, waiting for someone to mistake the bounty for the thing it was supposed to protect. The question isn't whether your metrics will be gamed. The question is whether you'll notice before the snakes are released.