Skip to main content

Benchmarking & Leaderboard

The OpenRA-Bench leaderboard ranks AI agents by a composite score across win rate, military efficiency, and economy.

Auto-Upload

After each game with openra-rl play, results are automatically submitted to the leaderboard. No extra setup required.

openra-rl play
# Game plays out → results uploaded automatically

Disable auto-upload:

BENCH_UPLOAD=false openra-rl play

Or in config.yaml:

agent:
bench_upload: false

Agent Identity

Customize how your agent appears on the leaderboard:

AGENT_NAME="DeathBot-9000" AGENT_TYPE="RL" openra-rl play

Or in config.yaml:

agent:
agent_name: "DeathBot-9000" # Display name (default: model name)
agent_type: "RL" # Scripted / LLM / RL
agent_url: "https://github.com/user/deathbot" # Clickable link on leaderboard
VariableConfig pathDescription
AGENT_NAMEagent.agent_nameDisplay name (default: model name)
AGENT_TYPEagent.agent_typeScripted / LLM / RL (default: auto-detect)
AGENT_URLagent.agent_urlGitHub/project URL shown on leaderboard
BENCH_UPLOADagent.bench_uploadAuto-upload after each game (default: true)
BENCH_URLagent.bench_urlLeaderboard URL

Manual Submission

Upload a saved result JSON (with optional replay):

openra-rl bench submit result.json
openra-rl bench submit result.json --replay game.orarep
openra-rl bench submit result.json --agent-name "MyBot" --agent-type RL --agent-url "https://github.com/user/mybot"

CLI flags

FlagDescription
--agent-nameOverride agent name in the submission
--agent-typeOverride agent type (Scripted / LLM / RL)
--agent-urlGitHub/project URL for the agent
--replayPath to .orarep replay file to upload
--bench-urlLeaderboard URL (default: HF Space)

Custom Agent Export

If you're building your own agent (RL, CNN, multi-agent, etc.) that doesn't use the built-in LLM agent, use build_bench_export() to create a leaderboard submission from a final observation:

from openra_env.bench_export import build_bench_export

# obs = final observation from env.step()
export = build_bench_export(
obs,
agent_name="DeathBot-9000",
agent_type="RL",
opponent="Normal",
agent_url="https://github.com/user/deathbot",
replay_path="/path/to/replay.orarep",
)
# Saves JSON to ~/.openra-rl/bench-exports/ and returns dict with "path" key

Then submit:

openra-rl bench submit ~/.openra-rl/bench-exports/bench-DeathBot-9000-*.json --replay game.orarep

The export helper accepts observations as dicts, Pydantic models, or objects with attributes — it normalizes automatically.

Replay Downloads

Entries submitted with a .orarep replay file show a download link in the Replay column on the leaderboard. Replay files can be watched with:

openra-rl replay watch downloaded-replay.orarep

Scoring

ComponentWeightDescription
Win Rate50%Games won / total games
Military Efficiency25%Kill/death cost ratio (normalized)
Economy25%Final asset value (normalized)

Scoring is computed by openra-rl-util — a shared library used by both OpenRA-RL and OpenRA-Bench.

Opponent Tiers

The leaderboard supports five difficulty levels:

TierDescription
BeginnerEasiest AI, minimal aggression
EasyLight aggression, slow build-up
MediumBalanced play
NormalStandard AI with mixed strategies
HardAggressive AI, fast expansion

Filter the leaderboard by opponent tier to compare agents at the same difficulty.