Start here
Quickstart
The engine and arena are Rust; training is Python on ROCm. Everything below runs from this directory unless stated.
Engine and arena
cd ../server
cargo test --workspace
cargo run --release -p armies-engine --bin bench
cargo run --release -p armies-arena --bin matchup -- \
--red greedy --blue random --games 200 --rules training --out ../research/runs/greedy-vs-random.json
cargo run --release -p armies-arena --bin tournament -- \
--policies random,greedy,expectimax,rollout --games 100 --rules training --out ../research/runs/ladder.json
cargo run --release -p armies-arena --bin selfplay -- \
--red greedy --blue greedy --games 10000 --rules training --out ../research/runs/greedy-selfplay.jsonl
The benchmark prints the single-core and all-core throughput that
the engine page quotes. matchup plays paired
seeds on every core and writes the JSON record the arena documents in
../server/docs/arena.md.
Training
just setup # creates .venv with PyTorch for ROCm and builds the armies module
just smoke # two iterations of setup and move training on 256 environments
just train smoke 20 runs/first # a run directory with metrics and checkpoints
just evaluate runs/first greedy 40
just belief runs/first
just launch scaled " --preset small --iterations 2000 --evaluate-every 20" # survives the terminal
just runs # every run's state and iteration
just stop scaled # stop a launched run
Every training run writes status.json, metrics.jsonl, evaluations.jsonl
and checkpoints under runs/<id>/, resumes from checkpoints/latest with
--resume, and is launched by just launch through systemd-run;
training/README.md is the contract.
python -m armies_train --help lists the presets. The paper preset uses
the paper's network sizes and schedules; on this machine it is for
overnight runs, not for a first look.
Filing
python3 -c 'import uuid; print(uuid.uuid4())' # a new registration id
python3 scripts/check_content.py # validates pages and assets
python3 -m unittest discover tests/content # tests the validator