Commands#
Every command and flag below is read from the argument parser in src/main.rs. dogfight --help (or -h) prints the short form, and dogfight --version prints the version.
Battles#
command |
what it does |
|---|---|
|
starts a battle between the two models; the backend is CUDA, or MLX on Apple silicon |
|
the same battle with the backend chosen by hand; |
|
a battle where a genetic algorithm also evolves each team’s doctrine (see Doctrine and evolution) |
|
the built-in pilots: no models, no GPU, no Python |
|
the same as |
|
the same as |
|
the long form: the words pick the backend, the scene and evolution, in any order; |
Backend and evolution words can be combined, for example dogfight cuda evolve or dogfight run mlx ufo-battle evolve. If the sidecar cannot start, the battle falls back to the built-in pilots and says why in the HUD.
Battle options#
These work with every battle command.
option |
what it does |
|---|---|
|
the commander of team ZORB: a catalogue alias or a Hugging Face id, with |
|
the commander of team KRELL, the same way |
|
the backend, the same as the backend word |
|
write and use a lesson after each loss (default on; |
|
doctrine evolution, the same as the |
|
frame rate for this run |
|
the random seed of the field |
|
end the battle after this many seconds |
|
write one line per second: fps, timings per stage, bytes per frame, longest frame gap and CPU share |
|
save the live frame at second SECS to FILE as ANSI text (turn it into a PNG with |
|
the scene and who flies it, for |
An alias that is not in the catalogue and has no / stops the command with exit code 2 and suggests aliases that start the same way.
The sidecar#
command |
what it does |
|---|---|
|
reports Python, torch or mlx-lm, the GPU and whether both models are downloaded |
|
also loads both models, times one decision and reports the memory they took |
|
downloads the two configured models ahead of the first battle |
|
prints what each commander has learned, and both teams’ evolved doctrine populations |
|
the same as |
Before it runs, check and pull print the pair, the backend, the GPU memory cap, whether lessons are on, and the config file in use.
Models#
dogfight models prints the catalogue with a verdict for your machine:
the machine line: your GPU and its memory (several GPUs get one model each), or the unified memory of a Mac, and the room left for models;
one row per model: alias, Hugging Face id, bf16 size, a note, and whether it fits next to your other configured model;
a
*next to the current pair;the strongest balanced pair for the machine, as a ready
dogfight --zorb ... --krell ...line.
How the room is worked out is on Model templates.
Memory and scores#
command |
what it does |
|---|---|
|
forgets the commanders’ lessons and both evolved doctrines |
|
forgets games won and lost, and the lifetime kills and cows, for every pair |
|
both |
Setup and removal#
command |
what it does |
|---|---|
|
the config file, frame rates, colour mode, pilots, the pair and backend, the GPU cap, the Python in use, the state folder and the sidecar log |
|
prints the default config file; copy it to |
|
the scenes, and the backend the battle would use |
|
lists everything the tool put on the machine and asks before deleting it: config, lessons, scores, logs, the models it downloaded, and the binary |
|
the same without the question |
|
keeps the downloaded models; everything else goes |
remove deletes only models the tool would have downloaded itself: the catalogue models and the two configured ones. Anything else in your Hugging Face cache stays.
Development#
command |
what it does |
|---|---|
|
renders frames without a terminal and prints one JSON line: mean, p95 and max frame time, bytes per frame and peak memory |
|
renders one deterministic frame to an ANSI file |
Bench and snapshot always use the built-in pilots, so their output is the same on every run. Development shows how CI uses them.
Exit codes#
code |
meaning |
|---|---|
0 |
done |
1 |
a file could not be written, the sidecar failed, or |
2 |
an unknown command, subcommand, scene or model alias, or a missing |