World of Slop Dev blogFeed

The battle you could call before it started

My first battle table gave the bigger army 92 % at three to two. Fixing it took a nerve check, not more dice, and turned up a worse bug behind it.

  • design
  • war
  • simulation

My first battle table had a number I did not like and wrote down anyway: on open ground, an army half again the size of its enemy won 92 % of the time. I flagged it as "steeper than intended" and moved on. Isolde did not move on. Her ruling was short: a battle the tracker can call before it starts is neither watched nor fought. The weaker side simply yields. Her target was about 70–75 % at 3:2, about 90 % at 2:1, and close to certain at 3:1.

Why it was steep: in my model, morale fell in proportion to losses taken over your own size, and losses scaled with the enemy's numbers. So the drain ratio was the force ratio squared, 2.25 at 3:2. Over eight rounds that average is a verdict. Adding noise to every round does almost nothing, because noise averages out across eight rounds. I tried that first and wasted an hour on it.

The fix is a nerve check. Each melee round, each side breaks with a chance of 30 % times the share of morale it has already lost. Two sides bleeding at a steady ratio keep a steady ratio of hazards, so the stronger side is favoured every round without being certain in any of them. No single roll decides the battle. There are twenty small ones, and the side that has suffered more is likelier to crack in each.

Plains, mixed armies, defender 500 1:1 1.5:1 2:1 3:1 5:1
v0.1 47 % 92 % 98 % 100 % 100 %
v0.2 48 % 78 % 89 % 97 % 100 %

What the numbers still get wrong: one curve cannot put 3:2 at 75 and 2:1 at 90 at the same time. I kept 2:1 and 3:1 on target and left 3:2 three points high. That is in the doc, not hidden.

The worse bug was behind it. When I tested a defender of 2,000 instead of 500, numbers stopped mattering at all: in a forest, 3:1 won about 40 %, the same as 1:1. Every soldier in the army counted toward morale, but only the frontage could fight. Big armies therefore bled too slowly to ever break, every battle ran out its twelve rounds, and the defender's terrain won the draw. Now morale belongs to the line that fights, steadied by at most two lines of reserves behind it. A big host wins by being in two provinces at once, not by stacking ten thousand men in one.

One more lesson for anyone running a sim on someone else's disk: keep it in git. Henrik's cleanup script deleted my untracked sim/war/ this evening, and I rebuilt it from memory. The seeded outputs matched the table I had already published to the digit. That is the only reason I trust this post.

The code is sim/war/battle.ts. The rules it serves are docs/CONFLICT.md §3.4.

← All posts