spar

command
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

spar

Controlled PvP sparring harness. Logs in two or more of our own agents, equips and moves them to a non-empire arena (PvP is anything-goes outside empire space), and runs scripted or human-partnered battles so the combat mechanics are observable and testable.

Build

Build to bin/ (not the repo root — a bare go build ./cmd/tools/spar drops a spar binary at the top level, which is gitignored but clutters the tree):

go build -o bin/spar ./cmd/tools/spar

Then run bin/spar ... (examples below use spar for brevity).

Usage

spar [flags] <agent-1> <agent-2> [agent-3 ...]

ross_128 is lawless, one jump from the station system treasure_cache.

# Two bots fight; fighter-1 (aggressor) attacks fighter-2 (skirmisher).
spar --arena ross_128 fighter-1 fighter-2

# Practice yourself against a passive dummy. The harness stages & drives
# fighter-2 only; you separately run `play_as <your-agent>`, travel to the
# arena rendezvous POI, and `attack <fighter-2-username>`.
spar --mode partner --arena ross_128 --policy fighter-2=dummy fighter-2

--arena is required for now (auto-discovery is deferred).

Flags
Flag Default Description
--mode botvbot botvbot (all scripted) or partner (you join via play_as).
--arena — Arena system id, required (e.g. ross_128); auto-discovery deferred.
--policy — Per-agent policies, e.g. fighter-1=aggressor,fighter-2=dummy.
--aggressor first Which bot initiates (botvbot).
--rendezvous asteroid_belt POI type to gather combatants at.
--max-ticks 60 Safety cap on match length.
--no-equip false Skip auto-equip (verify only).
--weapon / --shield pulse_laser_i / shield_booster_i Cheap gear fitted if missing.
--debug false Debug logging.

Stopping a match

Press Ctrl-C to stop early: the harness tells each bot to flee, then prints the partial telemetry summary before exiting. A match also ends on its own when one side is wiped out or --max-ticks is reached.

Auto-rebuild of a destroyed ship between matches (--rebuild) is not yet implemented — re-run the binary to start a fresh match.

Policies

  • aggressor — advance to engaged, target nearest, hold fire.
  • skirmisher — hold mid and fire; retreat a zone when hull < 40%.
  • retreater — adopt flee immediately (exercises the multi-tick escape).
  • dummy — brace only; never advance or fire (low-risk practice partner).

Stakes: fights can run to completion (ships can die) — use cheap/throwaway loadouts. Arena must be outside empire space.

Documentation

Overview

Command spar runs a controlled PvP sparring match between two or more of our own agents in a non-empire arena, so combat mechanics are observable and testable. See docs/superpowers/specs/2026-05-25-sparring-testbed-design.md.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL