Slagworks: Balanced by Bots, Broken by My Thumb

This series has been climbing a ladder of questions. Pong asked whether Claude Code could build a game at all. Breakout asked whether it could make one feel fair, and answered with statistics: a bot played ten thousand headless games while the levels were tuned. Sokoban asked whether its content could be trusted, and answered with proofs. Game six asks the question that card game designers actually lose sleep over: can it balance a strategy space, where the thing being balanced is not a level or a curve but a population of decks that all want to eat each other?
So I picked a card battler. Claude built Slagworks: a one versus one duel with a mining theme, three archetypes that any Magic player will recognize on sight. Cinder is burn, cheap rushers and face damage. Bulwark is control, walls and armor and removal. Cogwork is the value engine, wide boards and buffs and card draw. Twenty five life, energy that ramps from one to six, four board slots, guards that must be attacked first. As usual, Claude wrote all of it: the rules engine, the tests, the bots, the UI, the balance tools, and every card. My contributions were the direction, the decisions, and a phone. The phone turns out to be a load bearing character in this story.
One design decision matters more than all the others, so it goes first: the only randomness in the entire game is the shuffle. Every spell targets deterministically. Burn hits the weakest enemy unit or the face. Removal hits the strongest. There are no damage ranges, no coin flips, no random discard. Claude chose this so that the bots could search the game honestly, and it paid for itself twice over in ways neither of us predicted. More on that later.
pick a deck, keep or redraw, then: tap a card and hit play · tap your unit, a target, then attack · the workshop button opens the deck editor
That is the actual game, pulled live from this page. The workshop button is the deck editor, and the story of why it exists, and why it was locked shut for most of a day, is most of this article.
The totem pole
The balance instrument is a self play arena: greedy bots pilot both seats, seats alternate, and every archetype pairing plays hundreds of seeded games. Claude wrote the targets down before the first run, which is the only honest order to do it in: every matchup inside 40 to 60, first player advantage under 55 percent, no card with a win rate outside 35 to 65.
Version one was not a rock paper scissors triangle. It was a totem pole.
| matchup | version 1 |
|---|---|
| cinder vs bulwark | 9.8% |
| cinder vs cogwork | 93.4% |
| bulwark vs cogwork | 90.0% |
| first seat advantage | 63.3% |
Bulwark beat everything. Cogwork lost to everything. The entire bulwark deck occupied the top of the card scoreboard. What followed was twelve patches and roughly eighty thousand arena games, and the education was in how often the obvious lever was the wrong one:
- Giving the second player an extra card made the first player advantage worse, because the same patch sped up the tempo decks, and consistency amplifies whoever moves first.
- Nerfing cinder's Slag Hound barely touched the matchup it was supposed to fix and cratered a different one. The card was cinder's wall breaker, not its bully stick.
- One keyword swung a matchup thirty two points. Giving a one cost unit guard took cinder versus cogwork from 81 to 64. Giving a second cheap unit guard took it from 69 to 36, and the fix for overshooting was not reverting the keyword but shaving one hit point.
- The first player problem had no notch on its dial. Cards alone made it worse, one bonus energy turn undershot, three overshot and warped unrelated matchups. The instrument that finally worked was a mulligan, which on its own also made the seat gap worse, paired with bonus energy deferred to the second player's later turns. Two errors aimed at each other, canceling at 52.3 percent over a twenty four thousand game confirmation.
The shipped matrix landed at 49.4, 44.5, and 40.2, mirrors at fifty, every card between 38.6 and 56.2 percent. Balanced, proven, done. You can guess how long that lasted.
My thumb versus eighty thousand games
I played Slagworks on my phone, and in about six short sessions I filed more real bugs than the arena had found in its entire existence, because the arena was structurally incapable of seeing any of them.
Taps fired twice. Godot has a setting for its own touch emulation, which Claude turned off, and the bug survived, because mobile browsers synthesize their own compatibility mouse events after every tap and no engine setting touches those. I once played two Cinder Imps with a single tap. I played a card I had never read because tap to preview and tap to confirm arrived in the same gesture. The energy display lied to me: I cast a three cost spell while the screen showed two energy, because the coin bonus was real but the pip row never drew it. The card preview glued itself to the first thing I had touched, because hover does not exist on a touchscreen but a stale hover coordinate does.
Every one of these produced a structural fix rather than a patch. Nothing destructive happens where you just tapped: playing a card takes a tap to select and a distant PLAY button to confirm. Attacks arm a target and show a forecast before a red ATTACK button commits. And the forecast is the second payoff of the no randomness rule: because combat is deterministic, the game can tell you, as a fact and not an estimate, "deals 3, kills it, takes 1 back, survives." The design decision made for the bots' benefit turned out to be a gift to the player.
The arena balanced the game. My thumb made it playable. Neither instrument could have done the other's job, and this series keeps relearning that same lesson from new directions: every instrument measures exactly the player it simulates, and nothing else.
The planner breaks everything
Hard mode is a different bot. Where the greedy pilot takes the single best looking action over and over, the planner searches whole turn sequences and tests its best candidates against a full simulated reply before committing. It beats the greedy bot 81 to 19.
Then Claude pointed the arena at itself with planners in both seats, and the balance we had so carefully certified collapsed. Bulwark, the archetype that once crushed everything, won 3.4 percent of its games against planned cogwork. Reactive walls only ever worked because the greedy bot kept impatiently walking into them, and a planner is never impatient. This is Breakout's perfect player finding wearing a bigger costume: the balance was true of the pilot, not the game.
Five designed fixes went into the arena and five came back vetoed, including my favorite negative result of the whole project: making bulwark's board wipe more expensive measured as a buff, because the greedy bot had been wasting the cheap version on empty boards, and delaying it forced patience the bot did not otherwise have. When capping the single best performing cogwork card moved the matchup by one point, the conclusion was structural. No single card edit crosses a 96 to 4 gap. Hard mode shipped honestly labeled instead, with the pick screen telling you bulwark is an expert pick.
The forge and the wheel
If one card cannot fix it, maybe twenty can. Claude built the deck forge: a hill climber over legal deck configurations, evaluating every candidate on identical shuffles so the comparisons are paired, confirming every summit at triple the games.
Its first two findings reframed the whole project. First, a bulwark deck that beats planned cogwork 89 to 11 exists, ten coordinated swaps away from the shipped list that lost 96 to 4. The archetype was never hopeless. The list was wrong, and the winning shape abandoned walls entirely for removal and a clock. Second, the forge pointed at the shipped meta and built an 87 percent deck against it in about a minute, rediscovering from scratch a double finisher engine we already knew was degenerate. The certified balance was a local optimum among three specific lists, not a property of the card pool. The deck editor I wanted to ship slammed shut on the spot.
Then came the tool I think of as the project's crown: the metagame spiral. Forge the best deck against the current top decks, crown it, forge the answer to that, and repeat, eight generations deep. Slagworks turned out to be a wheel. A wall dynasty beat the shipped field, refined itself for three generations, then burn crashed through, refined itself, then the value engine counter attacked, running a card no meta had ever wanted because suddenly the field made it good. Rock paper scissors at every altitude, dynasties inside each reign.
The problem was never the cycling, which is what healthy metagames do. The problem was the amplitude. The counters ran 99 to 1.
The factor program
Here I made my one genuinely technical contribution, which was half remembering something. A coworker once showed me an engineering method for testing many variables in few experiments, a name I could not recall beyond "placker table." Claude identified it as a Plackett Burman design, from the design of experiments family, and restructured everything we did afterward around that discipline: one factor at a time, paired seeds, written down predictions, and eventually replicated runs.
The factor program ran the spiral as its measuring device and came back with the cleanest result in the whole project. Three construction factors, three separate jobs:
| factor | what it controls | the evidence |
|---|---|---|
| deck size | dilution | at 20 cards the current pool converged into a cogwork monoculture; weak pools cannot fill big decks |
| pool size | diversity | an expansion designed at the measured gaps restored the full three color wheel at 20, and did almost nothing at 15, a textbook interaction |
| copy cap | amplitude | at singleton, cross color counters collapsed from 95 to 5 down to 60 to 40 |
The copy cap result deserves its own sentence, because it falsified my favorite theory. We had concluded the brutal counters were the price of determinism, since scripts meet their counter scripts identically every game. Wrong. Deck consistency was carrying the amplitude. Make every card a one of and every draw becomes an event, and the predator pairs dissolve without adding a single dice roll to the game itself.
The certification cells wrote the ending. Singleton at fifteen cards failed exactly the way Commander players would predict: one of burn cannot assemble racing density, and cinder was locked out. Singleton at twenty cards passed everything: an open wheel, all three colors taking reigns, typical champion matchups between 45 and 60. Slagworks discovered it wants to be a highlander format, roughly the way Commander discovered itself, except this one has receipts.
The workshop, and sets as science
The deck editor finally shipped on that certified format: singleton, twenty cards, the full pool, with one detail I am disproportionately proud of. Your brews do not fight the shipped decks. They fight the eight champions the certification spiral evolved. The meta that certified the format is the gauntlet.
Every set since ships through the same gate, and the gate keeps earning its keep. Set four looked clean card by card and got rejected whole, because eighteen individually fair cards collectively made the format grindy enough to lock burn out again. Per color parity is not format parity, and that is a lesson that takes human playtest groups months to articulate. Set five introduced the game's first new mechanic, engines that tick every turn, through a probe program that caught something better than a balance problem: the bots were constitutionally blind to the mechanic, because their evaluation scored present board state and an engine's worth lives entirely in future ticks. Zero adoption at any price, until the evaluator learned to see. Then a split verdict between two seeds forced the certification criteria themselves to grow up: a converged meta where the off color is a 46 percent underdog is not a lockout, it is fairness, and telling those apart required auditing decks directly against the reigning field instead of counting crowns.
The lab notebooks for all of this, a balance log and a forge log with every veto and every number, live in the repo alongside the tests. The counter across every arena run, forge climb, and spiral generation reads somewhere in the millions of games.
What game six actually taught
Breakout taught statistical confidence and Sokoban taught logical confidence. Slagworks taught something less comfortable: confidence about a strategy space is always relative to the strategist. The greedy bot certified a balance the planner destroyed. The planner certified a meta the forge out built. The forge certified decks the spiral overthrew within three generations. My phone found seven bugs that no bot could experience, and the bots found degeneracies no human would live long enough to enumerate. There was no bottom to reach, only better instruments, and the honest place we stopped is the one place the machines cannot go next: the first human metagame. The instruments are all still running. I suspect they are about to measure me.