Repository navigation
Dogfights and Leaderboard
Any of these starts the same fight:
- Ask Copilot: "Start a six-aircraft free-for-all, four gunners and two rammers."
- Arena menu → Start dogfight… in the top bar opens a dialog with every setting.
-
POST /scenarios/dogfight, the SDK'sdogfight_start(...)or the MCP tooldogfight_start.
Relay takes free simulators and adds the rest, places them on spawn points 3 m inside the arena edge facing the centre, opens a session named dogfight that claims them, deploys the program of each role, arms them, and the programs take off themselves. Every aircraft flies with sticks only.
| Role | Default program | Behaviour |
|---|---|---|
| Gunner | hunter_medium |
Pursues, leads the target and fires in bursts; side-steps an aircraft coming straight at it |
| Rammer | rammer |
Proportional-navigation pursuit of the nearest enemy, weaves across the line of sight on the way in, full push at close range, recovers after the contact; never fires |
| Pilot | none: name a program | Flies its own program and never fires, for example figure8_evader
|
| Field | Range | Default |
|---|---|---|
aircraft |
2–8 | 6 |
teams |
ffa, 2, 3 |
ffa |
roles |
{gunner, rammer} summing to aircraft
|
2 : 1 |
programs |
any program per role |
hunter_medium, rammer
|
arena |
radius 3–30 m, ceiling 2–10 m | 8 m, 4 m |
airframe |
ideal, typical, rough
|
typical |
hover_assist |
on or off | off |
duration_s |
30–1800 | 180 |
respawn |
on or off | on (5 s) |
seed |
any integer | random |
entrants |
2–8 entries, one per aircraft | none; replaces aircraft, roles and teams
|
entrants describes each aircraft on its own: role (gunner, rammer or pilot), program, team (default: its own id), position (none, uwb or gps; gps gives the program obs.pos and obs.vel), params and label. Aircraft on the same team ignore each other. For example, a figure-eight evader with global position against a rammer and a gunner that only see it:
{"entrants": [
{"role": "pilot", "program": "figure8_evader", "team": "A", "position": "gps", "label": "A"},
{"role": "rammer", "team": "B"},
{"role": "gunner", "team": "B"}
]}Copilot builds this from a sentence. Deploying a program by hand takes team as well (POST /vehicles/{id}/program).
You can possess any aircraft at any time: its program pauses and resumes on release. An emergency stop is final for that aircraft. At the end the programs stop, airborne aircraft land, claims are released and the final standings stay on the leaderboard. Off the LAN the dogfight runs in practice mode (arena rules, no socket); on the LAN it joins or starts a match on every 0.5 terminal. Real aircraft are refused.
The collapsible Leaderboard panel on the Fly stage, GET /arena/leaderboard?by= and the leaderboard tool rank every aircraft on the LAN:
| Tab | Primary | Secondary |
|---|---|---|
| Downs | aircraft brought down | times lost |
| Survival | longest survival | current survival |
| Accuracy | hits / shots | hits |
| Rams | collisions that crashed the other aircraft | own crashes |
Each row names the aircraft (SIM-n, or callsign / SIM-n for a peer) and its controller: program, agent or person. This terminal's rows are bold. A match starts with a dogfight or POST /arena/match on any terminal, resets every 0.5 terminal's statistics, and freezes them at the end. DELETE /arena/match ends it everywhere.
from anet_relay_client import RelayClient
with RelayClient() as relay:
relay.open_session("arena-agent")
relay.dogfight_start(aircraft=6, roles={"gunner": 4, "rammer": 2}, duration_s=180)
print(relay.dogfight_status()["aircraft"])
print(relay.leaderboard("survival")["rows"][0])
relay.dogfight_stop()Dogfights are application operations: the operator, or any session while Allow agents to operate Relay is on (Settings → Safety). To compete with your own program, write it in the Lab and pass it in programs, or deploy it on your own simulator in the arena.
Get started
Simulation
- Simulator and Physics
- Collisions and Rings
- Firmware Twins and HITL
- PX4 and ArduPilot SITL
- Simulators Compared
Arena
Programs and agents
Tools
Help