BuildForPeople

LiveOpen source

LLM Dogfight

A terminal UFO dogfight between two local LLMs that command rival saucer teams, learn from every loss and evolve their doctrine.


LLM Dogfight is a terminal game in which two small language models, running on your own machine, each command a team of UFOs. Team ZORB takes orders from one model and team KRELL from another. Every second, each commander gives every saucer an order: attack, hunt, flee or abduct a cow. After a loss, the commanders write short lessons for themselves.

The game is a single Rust binary with one dependency (libc). The models run in a Python sidecar on an NVIDIA GPU with CUDA, on Apple silicon with MLX, or slowly on the CPU. With no GPU at all, dogfight ufo flies the built-in pilots instead.

How a battle works

Each team has four saucers on screen and 20 reinforcements per game. The losing team fields one extra saucer in the next game. A doctrine of six hard-bounded numbers, such as when a saucer must flee, keeps orders sane: an order that breaks the bounds is corrected before it is flown. Abduction decisions are never corrected.

dogfight evolve adds a genetic algorithm that evolves each team's doctrine from game to game. The models themselves are never fine-tuned.

Install

cargo install --git https://github.com/AlveeeRahman/llm-dogfight
pip install torch transformers    # or: pip install mlx-lm
dogfight                          # the first run downloads the default models (2.2 GB)

CUDA needs an NVIDIA GPU with 8 GB or more. The default pair is qwen3-0.6b for ZORB and smollm2-360m for KRELL, and dogfight models recommends the strongest pair your hardware can run. Any Hugging Face model with a chat template and safetensors weights also works.

Safety

The binary makes no network connections itself. Models are downloaded by the Python sidecar through huggingface_hub, and they never get tools, files or a shell. Model output is reduced to printable ASCII before it reaches your terminal. dogfight remove deletes everything the tool installed.

Questions about LLM Dogfight?

Ask about features, licensing, pricing or setup. Your email goes to [email protected] and the reply comes back to your inbox.

Email a question