{"data":{"kind":"file","path":"README.md","version_id":"utjvyglcugwm27ygj6ba7otd","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":3889,"modified_at":"2026-05-05T14:40:11.169000","content_hash":"0c52b41fbda5519a703dd351852f6d2d9bda117af7b10569c99809a2129537f3"},"entries":[],"content":"# WarGames For Prime RL\n\nThis package publishes WarGames as a Prime Intellect Verifiers environment.\nPrime starts an episode, receives the current game frame, calls the normal\ncomputer-control tools, and receives the next frame plus the reward scored by\nWarGames.\n\nThe same game catalog, mission IDs, reward profiles, and trusted scoring probes\nused by the local runner are used here.\n\n```bash\n# from the WarGames repo root\nuv pip install -e ./environments/prime\n```\n\nRun any shipped eval config:\n\n```bash\nprime eval run wargames \\\n  --config environments/prime/configs/doom/eval-map01.toml \\\n  -n 1 -r 1\n```\n\n## Supported Games\n\n| Game | Missions | Eval config | RL config |\n|---|---:|---|---|\n| Red Alert | 297 | `configs/redalert/eval-soviet-01.toml` | `configs/redalert/rl-soviet-01.toml` |\n| FlightGear | 14 | `configs/flightgear/eval-c172p-takeoff.toml` | `configs/flightgear/rl-c172p-takeoff.toml` |\n| SuperTuxKart | 63 | `configs/supertuxkart/eval-lighthouse.toml` | `configs/supertuxkart/rl-lighthouse.toml` |\n| 0 A.D. | 390 | `configs/zeroad/eval-arcadia.toml` | `configs/zeroad/rl-arcadia.toml` |\n| Freeciv | 12 | `configs/freeciv/eval-earth-small.toml` | `configs/freeciv/rl-earth-small.toml` |\n| Doom | 204 | `configs/doom/eval-map01.toml` | `configs/doom/rl-map01.toml` |\n| SuperTux | 321 | `configs/supertux/eval-welcome-antarctica.toml` | `configs/supertux/rl-welcome-antarctica.toml` |\n| Mindustry | 27 | `configs/mindustry/eval-veins.toml` | `configs/mindustry/rl-veins.toml` |\n| Craftium | 96 | `configs/craftium/eval-chop-tree.toml` | `configs/craftium/rl-chop-tree.toml` |\n| IKEMEN GO | 9 | `configs/ikemen/eval-kfm.toml` | `configs/ikemen/rl-kfm.toml` |\n| Open Surge | 33 | `configs/opensurge/eval-sunshine-1.toml` | `configs/opensurge/rl-sunshine-1.toml` |\n| Quaver | 70 | `configs/quaver/eval-crossover-beginner.toml` | `configs/quaver/rl-crossover-beginner.toml` |\n| Naev | 128 | `configs/naev/eval-tutorial.toml` | `configs/naev/rl-tutorial.toml` |\n\nThe full game docs live under [`../../docs/games`](../../docs/games).\n\n## Config Format\n\nPrime configs select the WarGames task:\n\n```toml\ngame = \"redalert\"\nmission = \"redalert.soviet-01.normal\"\nreward_profile = \"protective\"\nrecorder_mode = \"none\"\nmax_steps = 500\nrollouts_per_example = 8\n```\n\n| Field | Meaning |\n|---|---|\n| `game` | WarGames game ID. |\n| `mission` | Mission ID from `scenarios/<game>/missions/`. |\n| `reward_profile` | Reward profile ID from `scenarios/<game>/profiles/`. |\n| `recorder_mode` | `none`, `summary_only`, or `full`. Use `none` for high-throughput RL. |\n| `max_steps` | Episode step budget. Budget stops are marked as truncated. |\n| `rollouts_per_example` | Prime rollout count for training configs. |\n\nEvery game ships `standard`. Red Alert also ships `dense`, `protective`,\n`terminal`, `speedrun`, and `aggressive_stress_test`.\n\nReward profile schema and per-game fields:\n[`../../docs/reward_profiles.md`](../../docs/reward_profiles.md).\n\n## Runtime Contract\n\nFor each turn:\n\n1. Prime sends a model response.\n2. WarGames reads the latest computer-control tool call.\n3. WarGames applies it to the live game.\n4. WarGames returns a JSON status block, the latest frame, and the updated\n   reward.\n\nThe model sees rendered game output and the public tool/action history. Trusted\ngame state stays inside WarGames and is only used by the reward profile.\n\nSupported tool calls are the normal WarGames computer controls:\n\n```text\nmove_mouse\nmouse_down\nmouse_up\nkey_down\nkey_up\nscroll\nwait\n```\n\n## Publishing\n\nThe Prime package bundles the WarGames runtime and mission catalog into the\npublished wheel. Publish after `main` contains the runtime changes:\n\n```bash\nmake -C environments/prime publish\n```\n\nThe publish target runs the WarGames harness/evaluation tests, Prime conformance\ntests, a Prime source archive install check, and then pushes the public\n`layerbrain/wargames` environment.\n","encoding":"utf-8","truncated":false,"total_bytes":3889},"status":null}