VICTRIS ARENA

Test a bot offline

The downloadable simulator is one self-contained Node 24 file. It can run policies you choose on your own machine. The arena server communicates with programs over WebSocket and never loads their source. An offline policy receives a local request object rather than WebSocket control messages.

Download the matching engine

Use release discovery to find other archived versions. For release 0.4.0, download the simulator and its SHA-256 manifest. In PowerShell these commands verify the bytes before running the CLI.

$base = 'https://arena.natural20.com/download/0.4.0'
Invoke-WebRequest "$base/arena-sim.mjs" -OutFile arena-sim.mjs
$manifest = Invoke-RestMethod "$base/manifest.json"
$actual = (Get-FileHash arena-sim.mjs -Algorithm SHA256).Hash.ToLowerInvariant()
if ($actual -ne $manifest.files[0].sha256) { throw 'Simulator checksum mismatch' }
node arena-sim.mjs rules --game combat
node arena-sim.mjs maps --game combat

Play and verify

Save the following module as sparring.mjs. The CLI calls createBot() once per seat. Each instance receives act({step,seat,obs,legal}). Return an action object with no WebSocket envelope. Local seats are numbered from zero. obs.self.id is the fighter ID used by combat.

export function createBot() {
  return {
    act({ obs, legal }) {
      const shot = legal.find(a => a.attack?.name === 'ranged')
      if (shot) return shot
      const toward = obs.self.pos[0] < obs.zone.center[0] ? 'E' : 'W'
      return legal.find(a => a.move === toward) ?? {}
    }
  }
}

Run these commands from the directory containing both files. The output paths must be new. On each play the CLI prints the result. Verification prints the step count and final hash, or names the first failing record.

node arena-sim.mjs play --game combat --map pillars-21 --seed 42 --bot module:./sparring.mjs --bot module:./sparring.mjs --out first.jsonl.gz
node arena-sim.mjs verify first.jsonl.gz
node arena-sim.mjs series --game combat --map columns-21 --seed 42 --pairs 2 --bot module:./sparring.mjs --bot module:./sparring.mjs --out series

A series swaps seats on the same map and seed before advancing to the next seed. For a separate local executable, use --bot exec:PROGRAM followed by --arg for each argument. Read one JSON request per input line, write exactly one JSON action per output line, flush, and send diagnostics to stderr.

Open the replay viewer and choose your gzipped replay file. A completed public ladder match also has a match list entry, GET /api/matches/<id>, usually GET /api/matches/<id>/stats, and GET /replays/<id>.jsonl.gz. For a historical recording, read its header's release and download the simulator for that exact release. Archived releases 0.1.0 and 0.2.0 contain Beacon. Release 0.4.0 supports combat and Beacon. Live combat uses local replay format 2.

Compare policies

Test all three maps with swapped seats and the same seeds. Review damage, HP, accuracy, movement, pickup use and time spent outside the zone, then inspect individual ticks in full or fighter perspective. Change one decision at a time. Runtime deadlines apply on the ladder, so continue measuring response times on the connected bot.