Game Arena Overview

April 13, 2026 · View on GitHub

English | 中文

Game Arena is GAGE's unified runtime for game-based evaluation. The current mainline implementation is centered on GameKit configs, ArenaRoleAdapter, structured arena output, and the unified arena_visual browser host.

Use this page as the durable overview. For browser operation details, use Arena Visual Browser Control.

1. Current Runtime Shape

Current Game Arena configs use the same pipeline shape as other GAGE tasks:

GameArena runtime core design

flowchart LR
  A["PipelineConfig"] --> B["TaskPlanner"]
  B --> C["ArenaRoleAdapter"]
  C --> D["GameKit runtime"]
  C --> E["PlayerDriver / backend / human"]
  C --> F["Scheduler"]
  C --> G["arena_visual gateway"]
  D --> H["GameResult"]
  F --> H
  G --> I["browser session + replay artifacts"]
  H --> J["sample.predict_result[0].arena_trace"]
  H --> K["sample.predict_result[0].game_arena"]

Board, table, and frame games all write the same visual session contract under:

runs/<run_id>/replays/<sample_id>/arena_visual_session/v1/

The browser route is /sessions/<sample_id>?run_id=<run_id>. Runtime data is served by the Python gateway under /arena_visual/sessions/... and rendered by the prebuilt frontend/arena-visual/dist checked into this repository; regular users do not need a Node/npm environment.

2. Supported GameKit Families

FamilyCurrent configsVisual shape
Gomokuconfig/custom/gomoku/*_gamekit.yamlBoard scene
Tic-Tac-Toeconfig/custom/tictactoe/*_gamekit.yamlBoard scene
Doudizhuconfig/custom/doudizhu/*_gamekit.yamlTable scene
Mahjongconfig/custom/mahjong/*_gamekit.yamlTable scene
PettingZoo Space Invadersconfig/custom/pettingzoo/space_invaders_*_gamekit.yamlFrame scene
Retro Marioconfig/custom/retro_mario/*_gamekit.yamlFrame scene
ViZDoomconfig/custom/vizdoom/*_gamekit.yamlFrame scene

LLM configs now come in two families. Existing local configs are kept for internal/local testing. New *_openai_gamekit.yaml configs are the user-facing API path and read credentials from the environment:

export OPENAI_API_KEY="<YOUR_OPENAI_API_KEY>"
# Optional: defaults to gpt-5.4.
export GAGE_GAME_ARENA_LLM_MODEL="gpt-5.4"
# Optional: local or hosted OpenAI-compatible endpoint.
export OPENAI_API_BASE="https://api.openai.com/v1"

Use OPENAI_API_BASE plus GAGE_GAME_ARENA_LLM_MODEL for open-source local models served through an OpenAI-compatible API. No backend YAML edit is required.

Closed-source OpenAI API example:

export OPENAI_API_KEY="<YOUR_OPENAI_API_KEY>"
export GAGE_GAME_ARENA_LLM_MODEL="gpt-5.4"
unset OPENAI_API_BASE

Open-source OpenAI-compatible service example:

export OPENAI_API_BASE="http://127.0.0.1:<PORT>/v1"
export OPENAI_API_KEY="<LOCAL_SERVICE_API_KEY_OR_DUMMY_VALUE>"
export GAGE_GAME_ARENA_LLM_MODEL="<LOCAL_MODEL_NAME>"

3. Configuration Surface

GameKit configs are organized around role_adapters[].params:

BlockPurpose
game_kit / envSelect the game family and concrete environment preset.
runtime_overridesTune board size, realtime cadence, legal moves, frame capture, replay, or backend mode.
playersBind each seat to dummy, llm, or human.
human_inputEnable browser-submitted actions and live input queues.
visualizerEnable arena_visual, choose the browser port, launch behavior, and media transport.

Common visualizer fields:

visualizer:
  enabled: true
  mode: arena_visual
  launch_browser: true
  live_scene_scheme: http_pull
  linger_after_finish_s: 15.0

Frame-driven games can also use binary_stream or low_latency_channel when a config explicitly enables that path.

4. Run Entrypoints

Canonical scripts live under scripts/run/arenas/.

# PettingZoo Space Invaders OpenAI visual LLM run
bash scripts/run/arenas/pettingzoo/run.sh --mode llm_visual_openai

# Retro Mario pure-human realtime browser control
bash scripts/run/arenas/retro_mario/run.sh --mode human_visual

# ViZDoom OpenAI visual LLM run
bash scripts/run/arenas/vizdoom/run.sh --mode llm_visual_openai

# Doudizhu OpenAI visual LLM run
bash scripts/run/arenas/doudizhu/run.sh --mode llm_visual_openai

# Mahjong OpenAI visual LLM run
bash scripts/run/arenas/mahjong/run.sh --mode llm_visual_openai

Visual runs write replayable arena_visual_session/v1 artifacts under the run directory. Browser playback controls use those artifacts through the Arena Visual session page.

5. Choose a Topic

Use the topic docs as task-oriented runbooks:

NeedStart Here
Smallest board-game smoke and human coordinate inputTic-Tac-Toe Guide
Larger board coordinates, win-line output, and 15x15 browser runsGomoku Guide
Three-seat card table, legal action text, and chat metadataDoudizhu Guide
Four-seat card table and longer human acceptance runsMahjong Guide
Atari AEC frames, ROM checks, and low-latency media transportPettingZoo Atari Guide
Stable-retro ROM import and macro keyboard actionsRetro Mario Guide
ViZDoom rendering, POV telemetry, and discrete action idsViZDoom Guide
Shared browser controls, session APIs, input route, and replay artifactsArena Visual Browser Control

6. Output Contract

Arena writes structured results back into samples:

  • sample.predict_result[0].arena_trace: step-level actions, legality, timestamps, retries, scheduler facts, and runtime metadata.
  • sample.predict_result[0].game_arena: terminal summary such as winner, reason, total steps, scores, and episode returns.
  • artifacts.visual_session_ref: pointer to the arena_visual_session/v1/manifest.json sidecar when visual output is enabled.

Typical run output:

runs/<run_id>/
  summary.json
  samples.jsonl
  replays/<sample_id>/arena_visual_session/v1/
    manifest.json
    timeline.jsonl
    scenes/
    media/

GameArena visual data contracts

7. Visual Examples

Gomoku

Gomoku stage

Tic-Tac-Toe

Tic-Tac-Toe stage

Doudizhu

Doudizhu stage

Mahjong

Mahjong stage

PettingZoo Space Invaders

Space Invaders stage

Retro Mario

Retro Mario stage

ViZDoom

ViZDoom stage