part 11
A campaign with a budget: bosses, bonuses and the Iron Run
Thirteen missions, bosses built from a budget of points and a mode in which every attempt counts. How a measurement with games played by the AI found what is broken in the rules, and why the average lies.
Principalities[1] is a game that you play over and over. The campaign is a game that you get through. It has a beginning, an end and a curve of difficulty between them. On paper it looks like a job for a designer with a good feel. In Audamir it is a job for a spreadsheet.
The basic idea is one sentence from the design document: everything has a price in points that the AI measured. A mission, a bonus, a trait of a boss, a companion, a setting. When there is a common currency, balancing can be done without guessing.
A mission is a scenario
The campaign (the Prologue) has 13 missions in four chapters: Dawn, Fortresses, The Crown and Finale. A mission consists of a small text picture of the map, the players, special terrain (barracks, a tower, a vault, rivers, portals, fog) and a goal. The goal is not always "capture everything": it can be the capital of a boss, holding cities, survival or a share of the map. Without that, thirteen missions would be the same thing thirteen times.
After every mission the player picks one of three offered bonuses (Supplies, Recruiting, Tactician, Commander, Sharpshooter, Armour, Plunder, Reroll, Revenge). The bonuses apply only in the campaign, so that the rankings of Principalities stay comparable.
The curve that the bonuses carry
This is what the difficulty looks like today, in the share of wins of the level-3 AI ("the good player") that plays a mission 300 times. The grey columns are missions without bonuses, the blue ones with "typical" bonuses (after every mission one random bonus from the offer):
Without bonuses the missions from the eighth on can hardly be won: the AI wins them in at most 17% of games (the tenth mission), in the eighth in 8% and in the last in 0%. This is intentional. By the eighth mission the player has made seven bonus choices and the curve counts on them. The target for missions with typical bonuses is 55 to 65% for the level-3 AI, for bosses 40 to 50% and for the finale about 40%. After a boss a new act begins a little easier, and the end of an act is always the hardest.
Bosses made from a budget
A boss is not a hand-designed creature. It gets a budget of points and its traits are composed from it. Each trait has a price that the AI measured (by how much its chance drops when the boss has that trait):
| Trait | Price in points |
|---|---|
| Storehouses I / II / III | 4 / 7 / 11 |
| Citadel | 7 |
| Stone Skin | 5 |
| Plundering (steals a die, once per turn) | 9 |
| Aura, Guardians | 2 |
| Fury | 1 |
| Phantom (level-3 AI instead of level 2) | 25 |
The Phantom is by far the most expensive: the level-3 AI wins against it in the fourth mission in 2% of games instead of 69%. It therefore does not fit into an ordinary budget and belongs only to the bosses in the finale. The epithet of a boss reveals its ability (the Citadel gives the epithet the Wallbuilder, Stone Skin the Stony, Fury the Furious), so the player learns by playing.
What the AI found that a human would not
The AI is not a good player, but it is an excellent malicious tester. It plays the same way a hundred times in a row and knows no taboos. A few findings from tuning the bonuses (points from the measurement, a plus means that the bonus helps):
- Plunder (an extra die after every capture) had +30 points already at the first level. After the limit to the first capture of a turn it is +9. Plundering (after every capture a die stolen from the opponent's largest stack) was +39 and could not be beaten. Today it steals once per turn, +9.
- Commander (all random reinforcements onto border tiles) had +21 already at the first level, because the opponents and the AI spread their reinforcements evenly over the map. A share of 10 / 20 / 30% gives +2.6 / +7.0 / +9.5.
- Revenge originally let a tile with two dice keep two dice after a lost attack, so a loss cost nothing and one could attack endlessly for free. Today a loss always costs at least one die.
- Fortress (starting fortresses) had 0 points: the AI left them and the opponent attacked elsewhere. It dropped out of the offer.
- Defensive bonuses lead to a stalemate. When both sides are saturated with dice and an attack fails, nobody attacks and the player loses on the round limit. Defence for all tiles turned out in the measurement to be a worsening, so Armour is tied only to small stacks.
And then there is a finding that cannot be measured at all: with the goal "survive" the AI attacked, eliminated all the opponents and "survived". What is needed is an AI that attacks only at a high chance, and even that one does not measure everything: the level-2 AI falls as early as rounds 2 to 7, the level-3 AI holds out. That is why a defensive mission is judged by the level-3 AI.
The average lies
The most valuable lesson comes from the companions and the Threat. The Threat is the number of companions in the party: the more there are, the stronger the opponents and bosses and the higher the reward (later the Threat ladder 4 to 8). The first version gave the opponents a strong artificial intelligence at Threat 3. The average difficulty over all missions looked acceptable (−13 points). But it was worth looking at the missions with a boss: the chance of the AI dropped from about 40% to 1 to 4%, and the whole campaign with three companions could not be completed. The AI needed 144 attempts on the twelfth mission.
Why did the average hide it? The missions with a boss have a low base. The same shift in log-odds wipes out a larger share of wins there. Today the Threat changes only the number of extra dice and the budget of the boss (+1 point per level, only in missions with a boss), and at every change one looks at the table by mission, not at the average.
People who run servers know this: the average latency looks excellent until you look at the worst percentile, where users really suffer. Games are no different.
The Iron Run: what a mistake costs
The Iron Run came from a proposal called "Try runner": the same campaign, the same maps, but every attempt counts. You start with one attempt, the first mission is free, the following ones cost an attempt, every completed mission adds attempts, and when the run is completed the remaining attempts turn into Iron Dice. It is a sibling of the hardcore mode of Diablo 2, which the design document mentions explicitly.
The numbers (how many attempts per mission each difficulty gets, what payout each pays) were not written by eye. An exact calculation by dynamic programming over the bank of attempts was compared with a simulation under the real rules:
| Difficulty | Attempts per mission | 1 spare attempt at the end | Completes (model: 0.4 better than the AI) | Payout per started run |
|---|---|---|---|---|
| Iron | +2 | 1 die | 89% | 7.6 |
| Steel | +2 in act 1, then +1, boss +1 | 4 dice | 64% | 12.6 |
| Adamant | +2 in act 1, then +1 | 20 dice | 35% | 16.5 |
Five decisions followed from the measurement:
- A reward of "+n per mission" does not work. After the fifth mission the bank holds ten or more attempts and the balance is almost constant (64 to 75), so the player's skill is hardly reflected in it and the tension disappears. The reward is flat.
- The original coefficients ×3 and ×5 were too small. With a flat reward few attempts remain at the end (Adamant: 1 to 4), so a higher difficulty would pay less. ×1, ×4, ×20 apply.
- The reward is lowered after the first act (+2, then +1). With "+1 from the start" the runs get as far as missions 2 to 4.
- A weaker player gets nothing extra from a higher difficulty. It should be chosen by those who can handle it.
- A paid attempt cannot be thrown away for free. If a paid mission in progress is in the storage, then when another game is started, when a saved game is discarded and on restart, the game first asks for confirmation and the attempt is forfeited. The result of the mission is written immediately after the game ends, before the end card, so a browser crash in that window does not cost an attempt.
What I take from it
- A common currency is the best investment. A point = a drop of 0.125 in log-odds is the definition on which the campaign and the Iron Run stand.
- The AI is a bad player and an excellent tester. It finds a hole in a rule before anyone learns to exploit it.
- Do not look at the average. Look at the worst case. In this game that is the bosses.
- Zero points means take it out of the offer. A Fortress with zero value did not strengthen the player, it only filled the offer.
- If something cannot be measured (fog, "survive"), say so. The documentation lists them as estimates.
Sources and notes
- Measurement of the missions:
node tools/missions.js --games 300of 20 Oct 2026 (the chart). The procedure, the prices of the bosses and bonuses and the findings from tuning:docs/TUNING.md§13 and §14. The Iron Run:docs/DESIGN.md§16 anddocs/TUNING.md§15 (node tools/iron.js). - The design document compares the Iron Run with the hardcore mode of Diablo 2 (
docs/DESIGN.md§16.1).
Notes
- Until version 0.65.6 of 31 October 2026 it was called Classic. ↩︎