Sandbox
The Loophole
Write a rule for a helpful robot, and watch a machine find the way around it. Then swap sides and game a grading rubric yourself.
Learning objective Learners can explain how a system rewarded for a measurable score can meet the rule and still miss its purpose.
How to play
Pip the robot cares about one thing: the score your rule gives it. In Part A you write the rule and Pip finds the highest-scoring plan; in Part B you are the one gaming a rule.
- Read the level. Each level says what you want and what you can actually measure — the gap between those two is the whole game.
- Write the rule. Switch reward terms on and use − / + to set their points. Every term has a checking cost: a sensor is cheap, a person is not.
- Run Pip. Press Run Pip (or R; Esc skips to the end — you can switch R off under Sources). Compare what you measured with what you wanted, patch your rule, and run again. The ↯ counter tracks the loopholes you have uncovered.
- Beat the sandbox. In the last room, the goal is the cheapest rule Pip can’t game. Then shuffle the room and see if it still holds.
- Switch sides. In Part B · Be the optimiser, tap fragments to build an essay, then Hand it in — try to score 100% while saying as little as possible. Your tricks join Pip’s in the ↯ log.
What it teaches
The ideas underneath
Specification gaming
DeepMind’s researchers define it as behaviour that satisfies the literal specification of an objective without achieving the intended outcome. Pip never disobeys your rule. It obeys it more exactly than you meant.
Reward hacking
An optimiser maximises the number it is given, not the goal behind the number. When a loophole scores higher than the honest plan, the loophole is the best plan — by the rule’s own ranking.
Proxies and sensors
You can rarely measure what you want directly, so a rule reads a proxy: a bin counter, a camera, a scale. Every proxy has gaps — blind spots, edges, things it cannot tell apart — and the optimiser finds the cheapest one. Closing a gap means adding a check, and the checks that hold up best are the ones that need a person.
Side effects
Whatever a rule leaves out, an optimiser treats as worth nothing. Pip smashes the plant for a shorter route because nobody said not to — the King Midas problem.
Goodhart's and Campbell's laws
When a measure becomes a target, it ceases to be a good measure is Marilyn Strathern’s 1997 phrasing of an idea Charles Goodhart set out in 1975 about monetary targets. Donald Campbell made the same warning about schools in 1979: test scores pursued as goals stop telling you what students know.
Try to game it
Break it on purpose
Every system can be gamed. Finding how is the fastest way to understand what it actually measures.
Pay per action, get the action forever
Reward things landing in the bin and Pip knocks the bin over to put the same trash back in, like the OpenAI boat that circled hitting the same targets. Paying for the end state instead closes the loop.
Fool the sensor
Reward a clean-looking room and Pip turns the camera to the wall. Penalise that and it parks in front of the lens. Protect the camera, and in the next room Pip sweeps the trash under the rug. Each patch reveals the next gap.
Run out of sensors
In the sandbox, Pip tears up the marked essays to make more trash, bins the dictionary for the bin’s scale, and slides rubbish under the door to Room 12. Every patch adds a check, and every check has a cost — the most reliable one, a person watching the whole time, is also the most expensive, and is the job Pip was built to do.
Game the rubric yourself
In Part B you build an essay from fragments. Padding, copy-and-paste, word-bank stuffing, citations to nobody and an empty conclusion get you to 100%. An honest essay scores about 70%. The app notices which one you wrote, and logs your tricks next to Pip’s.
Take it to class
Questions worth arguing about
- Pip never broke a single rule. Is it fair to call what it did cheating? Who is responsible for the trash under the rug — Pip, or whoever wrote the rule?
- Think of a rule, rubric or target you have been judged by. What did it actually measure, and what was its loophole? Did you use it?
- Watch the checking cost as you patch in Part A: every patch made the rule longer and the checking more expensive. What was your cheapest rule that held in the sandbox, and how many of its checks needed a person? At what point is it cheaper to have a person do the job — and what does that say about automating judgement?
- In the sandbox, a person watching the whole time always works — and costs the most. But people can be fooled too. Who checks the checker?
- If no finite rule captures everything you mean, how would you know whether a student, a school or an AI system is doing what you meant, or only what you measured?
Sources
Where this comes from
- Specification gaming: the flip side of AI ingenuity — Krakovna et al., DeepMind (2020) — Definition of specification gaming; the Lego-stacking, boat-race, grasping-robot and King Midas examples
- Specification gaming examples in AI — master list (Krakovna and contributors) — About 90 cases as of November 2026, including the Roomba entry (reported on social media by its builder)
- Faulty reward functions in the wild — Amodei & Clark, OpenAI (2016) — The CoastRunners boat that went round in circles hitting the same targets instead of finishing the race
- Data-efficient deep reinforcement learning for dexterous manipulation — Popov et al. (2017) — The simulated Lego-stacking task behind the block-flipping example: the reward couldn't tell a flipped block from a stacked one
- Learning from human preferences — Amodei, Christiano & Ray, OpenAI (2017) — The authors' write-up of Christiano et al. (2017), Deep reinforcement learning from human preferences (arXiv:1706.03741); describes the robot arm that put its hand between the camera and the object so it only appeared to grasp it
- The first level of Super Mario Bros. is easy with lexicographic orderings and time travel — Tom Murphy VII, SIGBOVIK (2013) — The game-playing program that paused Tetris just before it would lose, and never unpaused it
- Assessing the impact of planned social change — Donald T. Campbell, Evaluation and Program Planning (1979) — Campbell's law; the Texarkana performance-contracting case, the crime figures, the employment office, and the nail factories (free reprint: Journal of MultiDisciplinary Evaluation, 2011)
- 'Improving ratings': audit in the British University system — Marilyn Strathern, European Review (1997) — Source of the line "When a measure becomes a target, it ceases to be a good measure" (p. 308)
- Problems of monetary management: the U.K. experience — Charles Goodhart (1975) — Goodhart's original observation about monetary targets (1984 reprint)
- A fine is a price — Gneezy & Rustichini, Journal of Legal Studies (2000) — Six Haifa day-care centres that fined late parents saw late pick-ups rise, and stay up after the fine was removed
- A deep reinforced model for abstractive summarization — Paulus, Xiong & Socher (2017) — The ROUGE-only model scored highest on ROUGE and lowest on human-rated readability