Files
tidewall/docs/BALANCE.md
T
claudeandClaude Opus 5.5 38812120df H3: Balance pass from 200 bot matches (make balance)
make balance (tools/balance.sh, tools/balance.gd, BalanceReport) plays 200
bot-only matches in four processes under nice and reports match length,
players standing over time, causes of death, eliminations by weapon and by
difficulty, judged against the new BALANCE_* targets in Tuning and the
GDD's Balance section.

Before: median match 5.0 min, 3.4 of 24 standing at 2 min, the boathook
41% of eliminations. After, over seeds 1001-1200: median 13.1 min (p10 9.2,
p90 14.6), top weapon the rivet repeater at 31.7%. Passes.

Changes, each traced from single-match runs (docs/BALANCE.md):
- Fix: bots leapt from the barge on a timer and landed hundreds of metres
  short of their spot; they now leap when it's in gliding reach or the
  barge starts drawing away from it.
- Bots spread their landings, only brawl whoever hit them, pick out new
  opponents within 30 m, roam locally and hold ground, run from a gun when
  unarmed, and (normal and hard) break off when badly hurt.
- Aim error widened; rivet repeater damage 17 to 15.
- Tide: lower early levels, longer holds; every match ends within 17.75 min.

Tests: BalanceReport, the new bot behaviours, the tide length. Tests that
leaned on old bot luck now pin or set up what they check. make match moves
to seed 29, where the scripted player still builds.

Closes #56

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:28:15 -05:00

7.2 KiB

Balance

How Tidewall's pacing and weapons were tuned, from batches of bot-only matches. The targets are in GDD.md and in src/sim/tuning.gd (BALANCE_*).

How to measure

make balance (tools/balance.sh) plays 200 bot-only matches of 24 players from seed 1001, in four processes under nice, and writes build/balance/report.txt:

  • match length from the barge leaving to the last player standing, as quantiles;
  • how many players are still standing at each two minutes;
  • causes of every fall, and the share the sea took;
  • eliminations by weapon, the boathook included;
  • wins, eliminations and mean place by bot difficulty.

It fails if there are fewer than 200 matches, any match lacks a winner, the median length is outside 12 to 18 minutes, or one weapon has more than 35% of weapon eliminations. BALANCE_MATCHES, BALANCE_FIRST, BALANCE_JOBS and BALANCE_DIR change the batch. A 30-match look takes about two minutes on four cores.

Bot-only matches are what the server can play on its own. They are not people: they show where the numbers are badly off, not how a match feels. Eric's playtest (R6) is the check on that.

What the first batches showed (2026-11-14)

The starting point, 30 matches on seeds 1001 to 1030:

Before
Median match 5.0 min (p10 3.3, p90 7.3)
Players standing at 2 min 3.4 of 24
Ended by the tide's clock 0 of 30
Top weapon the boathook, 41%

Most of a lobby fell within two minutes of the drop. Tracing single matches showed why, in order of how much each mattered:

  1. Bots leapt from the barge on a timer, not when their landing spot was in reach. A bot that picked a spot further along the route leapt early and came down hundreds of metres short, then walked across the island unarmed. This was a bug in NavBot._ride.
  2. Unarmed bots started boathook brawls with anyone within 6 m, so the landing was a melee. The boathook took 41% of all eliminations.
  3. Bots went looking for fights. A bot picked out any opponent within its sight (45 to 90 m) and chased them, and with nothing to loot it walked to a random safe point anywhere on the island, every 40 seconds, so the last few always met.
  4. Bots never broke off. Fights ran until someone fell. An unarmed bot kept looting while someone shot at it.
  5. The tide's endgame came at about 9 minutes. Phase 3's rise to 30 m left the last few players on ground small enough that they always met then.

Changes

Change Where Why
Bots leap once their landing spot is in gliding reach, or once the barge starts drawing away from it NavBot._ride Finding 1, a bug
Bots weigh BOT_LANDING_CHOICES (8) landing spots and take the one with the fewest other bots' landings within BOT_LANDING_SPREAD_METRES (60 m) BotBrain._drop, BotWorld.landings Spread the landing
An unarmed bot only swings its boathook at whoever hit it BotBrain.think Finding 2
Bots pick out a new opponent only within BOT_ENGAGE_METRES (30 m); one who shoots them is fought as far as they can see BotBrain._sense Finding 3
With nothing to loot, bots roam to safe ground within BOT_ROAM_METRES (60 m) and hold it for BOT_HOLD_SECONDS (45 s) BotBrain._hunt, BotWorld.random_safe_near Finding 3; the single biggest change to match length
An unarmed bot runs from a gun held in view; a hurt bot with something to heal with breaks off at its difficulty's retreat health (normal 35, hard 50, easy never) BotBrain._check_retreat Finding 4, and the judgement issue #76 asked of hard bots
Aim error: easy 7 to 9 degrees, normal 3.5 to 5.5, hard 1.5 to 3 BOT_DIFFICULTIES Bots hit nearly every shot at close range
Tide: lower early levels (6, 14, 24, 34, 46, 58, 75 m, was 8, 18, 30, 42, 54, 64, 75) and longer holds (150, 130, 120, 110, 90, 60, 45 s); rises unchanged. With sudden death every match ends within 17.75 minutes TIDE_PHASES Finding 5: move the squeeze later, and keep the longest match inside 18 minutes
Rivet repeater damage 17 to 15 WEAPONS It was the top weapon at 33%, close to the limit, as the commonest gun with the highest damage per second

Tried and dropped: doubling the weapons guaranteed at points of interest (LOOT_MIN_POI_WEAPONS to 48). It made no clear difference to how many bots were armed early; the leap bug was the real cause. It stays at one per player.

Each step, on the same 30 seeds (median minutes, players standing at 2 min):

Step Median At 2 min
Start 5.0 3.4
Unarmed bots don't start brawls 5.4 4.0
Engage range, local roaming, aim error 8.7 5.6
Landing spread 8.7 5.8
Longer holds 9.7 5.8
Retreat 9.4 5.7
Leap fix, running from guns 9.0 5.0
Lower levels, longer schedule 9.5 5.1
Holding ground 14.0 5.5

The 200-match result

make balance on seeds 1001 to 1200, with every change above (2026-11-14). It passes.

Before (30 matches) After (200 matches)
Median match 5.0 min 13.1 min (target 12 to 18)
p10 to p90 3.3 to 7.3 min 9.2 to 14.6 min
Shortest, longest 1.2, 8.8 min 2.2, 16.4 min
Players standing at 2, 6, 10, 14 min 3.4, 0.7, 0.0, 0.0 6.4, 3.6, 2.4, 0.7
Ended by the tide's clock 0 0
Falls to the sea 0.4% 2.1%
Top weapon boathook 41% rivet repeater 31.7% (limit 35%)

Eliminations by weapon over the 200 matches: rivet repeater 31.7%, dock carbine 27.4%, signal revolver 22.4%, fowling piece 11.5%, harpoon gun 4.5%, whaler's longgun 2.3%, boathook 0.3%. The three commonest guns take most eliminations, as they should; the rarer heavy weapons are under-used by bots, which don't yet lead long shots well or fight at the ranges the longgun suits.

By difficulty: hard won 148 matches, normal 42 and easy 10, with 2,053, 1,434 and 1,013 eliminations and mean places of 11.93, 12.41 and 13.12. Hard bots are now clearly the strongest, which issue #76 found they weren't: breaking off at 50 health and the wider gap in aim both count.

Every match ended with one player standing before the tide's clock ran out. Matches end when the rising water brings the last few together: half of them end between 11 and 14 minutes, from phase 4's rise to phase 6's hold.

Known and left open

  • The landing is still bloody. About three quarters of a bot lobby falls in the first two minutes, mostly unarmed bots shot by the first to find a gun. People are likely to spread out and hide more than bots do; R6 will show it. More could be done in bot looting (they give up on a hut whose chest someone else just emptied and set off across the island unarmed). Noted on #74 (H10, bot follow-ups).
  • The sea takes few players. Bots read the forecast well and leave in time, so drowning is rare. The tide still decides where the endgame is.
  • Hard bots win three quarters of matches. Against people that is what a "hard" setting should be, but if R6 finds them unfair, retreat and aim_error in BOT_DIFFICULTIES are the levers.
  • The whaler's longgun and harpoon gun are rarely the weapon that finishes someone. They are rare (rarity 2 and 1) and bots use them poorly; no change was made from bot data alone.