Play the RTS against the computer
Play a skirmish against the in-sim AI, or seat it in a networked lobby
The RTS has a computer opponent. It plays inside the simulation on every node, from an authored profile, and it sees only what its side sees. This guide starts a single-player match, sets up a skirmish, puts the computer in a networked lobby, and lets an LLM operator play a side.
Play a single-player match
- Open RTS from the apps menu.
- Choose Single player.
You play the first faction against the computer on the second faction, with the normal profile, on the 32 × 32 board. No network and no peer is needed.
Set up a skirmish
- Open RTS from the apps menu.
- Choose Skirmish.
- Pick Your faction, the AI faction, the AI profile and the Map.
- Choose Start.
The builtin content has three profiles:
| Profile | What it does |
|---|---|
| easy | Thinks once every two seconds. Keeps 5 gatherers and 1 production structure. Attacks with 24 supply, not before about 75 seconds. Casts no abilities and changes no modes. |
| normal | Thinks once a second. Keeps 8 gatherers and 2 production structures. Attacks with 16 supply, not before about 50 seconds. |
| hard | Thinks twice a second. Keeps 12 gatherers and 3 production structures. Attacks with 12 supply, not before about 30 seconds. |
The profiles are content data (ai_profiles: in the content bundle), so a new bundle can add its own.
What the computer does
Each think, the computer:
- Sends its army against an enemy that comes near one of its structures.
- Attacks when its army reaches the profile's supply: the nearest enemy structure that it sees, else an enemy start position.
- Puts a unit in a long-range mode when enemies are in that range, and casts its units' abilities on enemies in range.
- Puts idle gatherers on the nearest resource node, three on ore for each one on gas.
- Adds supply, production structures and gatherers up to the profile's targets.
- Trains the most expensive fighter that it can pay for, from every idle producer.
- Buys the attack upgrade when it has resources to spare.
It trains only its own faction's units. It reacts only to enemies that its side sees, and a cloaked enemy only when a detector of its side is near. It knows the map and the start positions, as a human does.
Put the computer in a networked lobby
In the RTS Lobby, the host can seat the computer:
- On an open seat, pick a profile.
- Choose Add computer.
- Optional: change its faction and team on its seat card.
A computer seat is always ready. To remove it, choose Remove on its seat card. A networked match still needs two nodes: a lone player against the computer plays a skirmish instead.
The computer runs inside the simulation of every node, so nothing about it crosses the network, and a replay of the match replays the computer too.
Let an LLM operator play
An OPAL operator plays a side through two tasks:
rts.query-statewithownerandfog: truereads what that side sees: units, resource nodes (nodes), the roster with each type'scapabilities, and the seats the computer plays (ai_seats).rts.issue-commandgives orders:gatherwith a node id intarget,train,build,attackmoveand the rest. The order enters the same command stream as the mouse.
Two more tasks help:
rts.ai.profileslists the profiles.rts.soakplays the computer against itself in two private simulations and reports the first turn on which they disagree. Use it to check a content change for a desync.
The host of a lobby seats the computer with rts.match.ai, such as {"seat": 1, "profile": "normal"}, and removes it with "profile": "none".