Arena Batch Runner

Configure multi-trial batch simulations, define statistical expectations, and inspect aggregate outcome reports across seeds and matchups.

What this uses

runSession createSession src/sim/combat.ts src/sim/kernel.ts src/sim/seeds.ts tools/validation.ts

Arena runs the same matchup N times across different seeds to produce statistical outcome distributions. It is the primary tool for balance testing — does Archetype A beat Archetype B at a reasonable rate? Does plate armour reduce lethality by the expected margin?

Run configuration

or load from Species Forge ↗

Sample report — Knight vs Fighter (500 trials)

static preview
Knight wins
63%
Fighter wins
31%
Draw / timeout
6%
Last 20 trials
KFKK FKDK FKKF KKFK DKFK
Expectations
Knight win rate > 55%63% ✓
Mean fight duration > 8 ticks14.2 ticks ✓
Draw rate < 10%6% ✓
Fighter win rate > 35%31% ✗ — needs rebalance

Try this

  1. Run npm run run:validation for built-in calibration scenarios — this is the closest existing batch runner.
  2. For custom arena runs: loop createSession({worldSeed: i, ...}) over a seed range, collect winner from runSession events.
  3. Define expectations as pass/fail predicates on the aggregated results — e.g., knightWins / total > 0.55.
  4. Add golden fixture assertions to test/ to lock the distribution and catch balance regressions in CI.