Development log

Oct 02 2026

The Balance Lab: Thousands of Matches Before One Number Changes

BALANCEPOST #3
Siege of the red castle at dusk, River Valley
Siege of the red castle at dusk, River Valley

A strategy game lives or dies on balance, and balance is easy to get wrong when you go by feel. So we built a lab. The simulation runs without graphics, far faster than real time, and pits the AI against itself as many times as we ask, with fixed random seeds so any interesting match can be replayed exactly.

The judge

Our first big round started with three separate reviews of the game: rules, balance and interface. Then came what we call the judge, a pass that weighs the findings against each other, decides what goes in, and makes every change survive a fresh batch of AI-versus-AI matches before it stays.

The balance review simulated about 1,000 matches and found something surprising: the castle barely mattered. Once a castle dropped below 90% it was gone in a median of 0.4 minutes, and giving it more HP or doubling its attack changed nothing measurable. Matches were decided by one giant fight between two armies sitting at the troop cap. The economy was simply too fast: the build zone filled up around minute 18, with 22,000 lumber left unused and bounties making up 31% of all gold earned.

The fix was a package, not a single knob: pricier entry buildings, bounties cut to 60% of their value, and the troop cap lowered from 110 to 90. We also found a siege exploit, since leaning on siege buildings won 75% of the time; a longer spawn interval brought it down to 60%. And the judge threw out two proposed AI changes after testing them. One of them let a single faction take 16 of 17 castle victories.

Matches that never end

Then we hit the opposite problem. We ran every faction pairing ten times on the default settings, 1,050 matches in all. In 21% of them there was a stretch of 10 minutes or more with no progress at all (no castle damage, no buildings lost for good, a front line going nowhere) while both armies kept producing and trading. A typical stretch like that saw 547 troops die. Overall, 18% of matches reached the 30-minute limit, and with the limit turned off, 3.8% were still tied after two hours. One went 114 minutes without progress.

Before changing anything, we spent 3,880 matches finding out why. Three causes stood out:

  • The troop cap as a wall. With both armies stuck at 90, extra gold no longer turns into pressure. Matches that peaked above 150 troops on the field became stalemates 73% of the time.
  • Home-field area damage. The AI puts its spell buildings behind its castle, where they cover their own half of the field: 99% of the troops they kill die on the caster's side. Whoever pushes walks out of their own umbrella and into the enemy's.
  • An AI that couldn't break a deadlock. In many factions it kept stacking defensive spell buildings in a slot it believed was artillery.

We also ruled things out: pathfinding (under 2% of troops ever got stuck), narrow maps (a chokepoint test map was the most decisive of all), healing and castle HP.

Then we put our tiebreaker on trial, replaying the timed-out matches with no limit. The current rule picked the eventual winner only 55% of the time. Income alone did worse than a coin flip, at 44%, because rebuilding a destroyed building adds income again, so the side taking the beating often earns more. Saved Rescues were right 76% of the time when they settled it. Rescues first, then net buildings destroyed, then the front line: that order got it right 68% of the time.

Evidence, cause, options

That is the discipline. Evidence first, then the cause, then a list of options, each one checked for risk. Does it keep comebacks possible? Does it punish a legitimate defense? Does it erase a faction's identity? Only then do we touch numbers, and we touch them carefully. Rewriting from scratch how the AI picks buildings made everything worse; a one-line change to the existing logic cut matches reaching the time limit from 18.1% to 11.0% without tipping the balance between factions.

As we write this, none of these stalemate fixes is in the game yet. The measurements are done, the options are on the table and the next experiments are defined. Balance is never finished, but at least now we know where to look.

— The Castle Arena team