{"slug": "the-ai-built-a-game-you-couldn-t-win", "title": "The AI Built a Game You Couldn't Win", "summary": "Anthropic's newest model generated three browser games for the Codorex project, but a brute-force sweep of roughly 250,000 simulated launches found that only one of Orbit Rescue's eight levels was completable, with level eight leaving four of five astronauts unreachable. The bug traced to a gravity constant of 9000 in the model's canvas code, which produced an acceleration too weak to bend the pod's path around planets, even though all 33 headless-browser checks passed and the code ran without errors. Raising gravity a thousandfold made every astronaut in every level reachable while preserving the puzzle.", "body_md": "# The AI Built a Game You Couldn't Win\n\nI couldn't reach the second astronaut.\n\nLevel one. Two astronauts, five pods, and after a dozen launches I was convinced the game was broken. I had generated it myself the day before, with Anthropic's newest model, and shipped it after watching the first ten seconds.\n\nI was right. It was broken. It was also the most interesting bug I've hit this year, because nothing about it looked like one.\n\n## Three sentences, three games\n\nCodorex is a thing I built for my kids: they describe a game, and a working version opens in the browser about a minute later. One HTML file, no install, no build step, no code.\n\nTo show what the newest model can do, I gave it three prompts and kept them deliberately short.\n\nA game where I fly a delivery drone through a city, catching parcels and dodging balloons and birds\n\nA space puzzle game where I slingshot a rescue pod around planets using their gravity to pick up floating astronauts\n\nAn educational game where meteors with math problems fall on a city and I have to type the answer to blast them\n\nOut came Sky Courier, Orbit Rescue and Math Meteor Defense. Each one runs at sixty frames a second, with touch controls for phones, sound, a HUD, a win condition and a restart. About 21KB of hand-written canvas code apiece, no libraries.\n\nAll three are playable without signing up: [have a go](https://codorex.com/back-to-school).\n\n## The part that passed every test\n\nBefore shipping I ran each game through a headless browser. Does it load, does it throw, does the canvas actually change when you press the arrow keys, does it have touch controls, does it survive two minutes of input. Thirty-three checks for Orbit Rescue. All green.\n\nSo the code ran. No exceptions, no console errors. The physics integrated smoothly, the aiming preview drew a neat dotted arc, and eight levels loaded with their planets and their stranded astronauts.\n\nSeven of those eight levels were impossible.\n\n## Gravity, off by three orders of magnitude\n\nOrbit Rescue is a slingshot puzzle. You launch a pod from the left edge, and it is supposed to bend around planets and get carried to an astronaut. That curve is the entire game.\n\nThe model wrote this:\n\n``` js\nvar G = 9000;   // gravity strength\n```\n\nGiven the game's own distances and masses, that number produces an acceleration you cannot see. The pod flew in a straight line. Every astronaut sitting behind a planet — which, in a game about curving around planets, is most of them — could not be reached by any shot at any angle or speed.\n\nLevel one has exactly two astronauts: one in open space, one directly behind the planet. I got the first and then, correctly, got stuck.\n\nHere is what makes it the interesting kind of bug. There is no error to catch. The code is correct in every mechanical sense. It parses, it runs, the maths is internally consistent, the tests pass. The game is simply not winnable, and the only way to find that out is to play it properly, or to simulate playing it properly.\n\n## Brute-forcing the answer\n\nRather than eyeball it, I lifted the game's own physics — the same gravity formula, the same collision radii, the same sixty-frames-a-second integration with three substeps, the same twelve-second flight limit — and swept the entire launch space. Every angle in one-degree steps, every speed from minimum to maximum, for all eight levels. Roughly a quarter of a million simulated launches.\n\nThe verdict was not ambiguous.\n\n| Level | Astronauts reachable | \n|---|---|\n| 1 | 1 of 2 | \n| 2 | 2 of 3 | \n| 3 | 2 of 3 | \n| 4 | 3 of 4 | \n| 5 | 3 of 4 | \n| 6 | 4 of 4 | \n| 7 | 4 of 5 | \n| 8 | 1 of 5 | \n\nOne level out of eight was completable. Level eight, the finale, had four unreachable astronauts out of five.\n\nThen I raised gravity and re-ran the sweep, looking for the value where every astronaut in every level becomes reachable while the game stays a puzzle rather than a formality. A thousandfold increase did it. At that setting the narrowest solution window is still only 1.6% of all possible launches, so you have to aim, but there is always an answer.\n\nFinally I wrote a bot that played all eight levels using the computed shots. It rescued every astronaut with pods to spare. Then I pushed the fix, and because each game is a single file in a database row, everyone holding the link got the working version without doing anything.\n\n## Runs is not works\n\nThere are a lot of \"AI writes a game\" demos around. They are all shipped at the moment mine was: the thing renders, something moves, post it.\n\nThe gap between *runs* and *works* is where the entire difficulty lives, and it does not show up in a test suite unless you write a test that understands the point of the game. \"Does the canvas change when I press a key\" tests for signs of life, not for playability. To catch this one I had to encode the actual win condition — can a launch exist that reaches this point — and then go looking for it.\n\nThat generalises well beyond games. The failure mode of generated software is rarely a crash. It is something that satisfies every check you thought to write and still does not do the job.\n\nNone of which lets the model off the hook. Anyone who has played this genre once would have noticed a pod flying dead straight on the first launch. But I am the one who shipped it, and my quality assurance was a ten-second glance at level one.\n\n## What a game actually costs to make\n\nThe other thing I did this week was measure what these models cost me, properly, through the real production pipeline rather than by guessing.\n\nFour prompts of the kind my kids actually type — snake, a platformer, an asteroids clone, a memory game — generated by each model, with exact token counts pulled from the database afterwards.\n\n| Model | Cost per game | Time | \n|---|---|---|\n| Claude Haiku 4.5 | $0.024 | 23s | \n| Claude Sonnet 5 | $0.065 | 43s | \n| Claude Opus 5 | $0.215 | 79s | \n| Claude Fable 5.1 | $0.50 | 101s | \n\nA twentyfold spread top to bottom, and the quality gap is visible rather than theoretical. Haiku's games work, but they are flat coloured rectangles and half of them have no touch controls at all. Fable's have parallax skies, particle effects, sound design and phone buttons placed where your thumbs already are.\n\nOne result surprised me enough to change production. Sonnet 5 runs adaptive thinking by default, and turning thinking *off* for this task made the output both cheaper and better. The two runs with thinking enabled each produced one broken game, a syntax error in one and a crash in the other. So the free tier now runs Sonnet 5 with thinking disabled: roughly triple what Haiku cost me, for output within touching distance of Opus.\n\n## Copying Claude's own pricing model\n\nOnce you know a single creation can cost fifty cents, \"unlimited\" stops being a plan and becomes a countdown.\n\nSo I borrowed the structure Anthropic uses for Claude subscriptions — an allowance per five-hour session that resets by itself, plus a weekly ceiling — and set my own numbers against measured costs instead of vibes.\n\nBoth paid plans start each week on Fable 5.1, the best model available, and step down to Opus 5 once a share of the weekly allowance is spent. You get the expensive model when it matters most, and the plan still holds together if you use every last creation.\n\n|  | Max 5x | Max 20x | \n|---|---|---|\n| Per 5-hour session | 5 | 20 | \n| Per week | 25 | 60 | \n| Model | Fable 5.1 for 7 a week, then Opus 5 | Fable 5.1 for 30 a week, then Opus 5 | \n| Price | $29 | $58 | \n\nAt those caps, somebody who maxes out every single week of a month costs me about $93 against $56 of revenue on the larger plan. That is deliberate. It is the top few percent of usage, and the alternative — a limit low enough that nobody can ever cost me money — is a worse product for everybody else.\n\n## The offer\n\nWhich is the reason I am writing this on a Sunday.\n\nUntil the end of September, the code **BACKTOSCHOOL50** halves Max 5x from $29 to $14.50 a month, and holds it there every month until 31 May 2027. Nine months at half price, applied for you here:\n\nFree accounts keep a game a day on Sonnet 5, forever. That is not a trial.\n\nAnd if you only do one thing, play Orbit Rescue. Level one, the astronaut hiding behind the planet. It is winnable now. It took a quarter of a million simulated launches to be sure of that.", "url": "https://wpnews.pro/news/the-ai-built-a-game-you-couldn-t-win", "canonical_source": "https://victorantos.com/posts/ai-built-a-game-you-couldnt-win/", "published_at": "2026-09-20 00:00:00+00:00", "updated_at": "2026-09-20 09:23:18.215070+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "generative-ai", "ai-tools"], "entities": ["Anthropic", "Codorex", "Orbit Rescue", "Sky Courier", "Math Meteor Defense"], "alternates": {"html": "https://wpnews.pro/news/the-ai-built-a-game-you-couldn-t-win", "markdown": "https://wpnews.pro/news/the-ai-built-a-game-you-couldn-t-win.md", "text": "https://wpnews.pro/news/the-ai-built-a-game-you-couldn-t-win.txt", "jsonld": "https://wpnews.pro/news/the-ai-built-a-game-you-couldn-t-win.jsonld"}}