| title | Agent Arena Dynamic Ops | ||||
|---|---|---|---|---|---|
| emoji | 🤖 | ||||
| colorFrom | blue | ||||
| colorTo | green | ||||
| sdk | docker | ||||
| pinned | false | ||||
| app_port | 7860 | ||||
| base_path | /web | ||||
| tags |
|
Agent Arena is an OpenEnv benchmark for stress-testing a maintenance rover in a secure industrial facility. The mission is deliberately multi-stage:
- collect an access badge
- unlock a safety gate
- reach the active service checkpoint
- recover when the checkpoint reroutes or a new blockage appears mid-episode
The repository now satisfies the Round 1 OpenEnv checklist end to end: real-world framing, typed models, openenv.yaml, 3 graded tasks, normalized rewards, a root inference.py, Docker deployment, Hugging Face Space metadata, and reproducible experiment artifacts.
This benchmark is built to measure planning and adaptability rather than simple movement:
- Sequential dependency: the rover cannot finish without badge pickup before gate unlock.
- Dynamic disruption: the checkpoint can move and a fresh obstacle can be introduced after the episode has already started.
- Partial-credit grading: the evaluator gives useful signal for progress, not just all-or-nothing success.
- Curriculum support:
/resetacceptsdifficulty_scalein[0, 1]to interpolate chaos, reroute timing, and step budget.
| Task ID | Difficulty | What Changes | Success Criteria | Expected Baseline |
|---|---|---|---|---|
easy_facility_reset |
easy | static checkpoint | Collect badge, open gate, reach checkpoint within budget | 0.94 - 0.99 |
medium_reroute_response |
medium | checkpoint reroutes at step 8 | Finish the full sequence even after the checkpoint moves | 0.60 - 0.92 |
hard_disruption_recovery |
hard | checkpoint reroutes and an obstacle may appear | Recover from reroutes and aisle disruption before timeout | 0.68 - 0.82 |
Evaluation dimensions are exposed directly in the observation/task metadata:
- easy: sequencing, goal completion, efficiency
- medium: planning, adaptation, reroute recovery, efficiency
- hard: long-horizon planning, adaptation, robustness, efficiency
The underlying simulator keeps dense learning rewards:
+10badge pickup+10gate unlock+50checkpoint completion-1per step-5invalid action
The OpenEnv-facing grader normalizes outcomes to the strict open interval (0, 1):
0.30badge milestone0.30gate milestone0.30checkpoint milestone- up to
0.10efficiency bonus
This keeps the training signal dense while making task-level scores easy to compare across tasks.
flowchart LR
A["inference.py / baseline_inference.py"] --> B["server/app.py"]
B --> C["AgentArenaEnvironment"]
C --> D["ArenaEnv grid simulator"]
C --> E["grader.py"]
C --> F["task_definitions.py"]
G["trainer/train.py"] --> H["DQNAgent + replay buffer"]
H --> D
G --> I["evaluator/metrics.py"]
I --> J["plots/plot_metrics.py"]
Core files:
openenv.yamlmodels.pyserver/app.pyserver/agent_arena_environment.pyagent_arena/openenv/task_definitions.pyagent_arena/openenv/grader.pyinference.py
Supported endpoints:
POST /resetPOST /stepGET /stateGET /schemaGET /metadataGET /healthPOST /mcpGET /env-infoWS /ws
Notable implementation details:
/statenow returns the real active HTTP session state instead of a throwaway environment./env-infoexposes task metadata, controls, reset options, and the active session snapshot./mcpnow lists meaningful tools such aslist_tasks,describe_task,describe_controls, anddescribe_curriculum.
The current Scaler dashboard requirements call out several mandatory items beyond basic OpenEnv validation. This repo covers them as follows:
- Root
inference.py: present and runnable. - Structured stdout logs:
inference.pyemits[START],[STEP], and[END]JSON log lines. - Required env vars for the submission runner:
API_BASE_URL,MODEL_NAME,API_KEY. - Real-world task: facility operations benchmark, not a toy game framing.
- 3 graded tasks: easy, medium, hard with normalized scores in the strict open interval
(0, 1). - Docker/HF Space deployment: repo includes Dockerfile and Space frontmatter.
python3 baseline_inference.py --episodes-per-task 4
| Task | Avg Score | Pass Rate |
|---|---|---|
| easy | 0.963 |
1.00 |
| medium | 0.878 |
0.75 |
| hard | 0.710 |
0.50 |
The baseline is strong on the static task, weaker when reroutes force replanning, and clearly inconsistent once disruption is introduced.
python3 -m agent_arena.trainer.train --results-path /tmp/agent_arena_full_metrics.json
Key findings from the completed run:
- Static-trained policy:
1.00success on static evaluation - Same policy under dynamic evaluation:
0.375success - Robustness drop:
0.625 - Dynamic evaluation completion after change:
0.1667 - Dynamic-policy failure analysis on seen layouts:
failed_after_environment_change=6,did_not_pick_key=6
This is the main benchmark result: agents that look solved in static settings degrade sharply once the environment changes during execution.
| Chaos Level | Success Rate | Avg Reward |
|---|---|---|
0.0 |
0.500 |
22.5 |
0.2 |
0.625 |
4.875 |
0.4 |
0.375 |
-17.625 |
0.6 |
0.125 |
-99.5 |
Increasing disruption reliably pushes performance down, especially at 0.4 and 0.6.
Expert rollout with dynamic goal enabled:
Starting episode 1 on layout seed 11
. . # . .
A . D . .
. . # X .
. K # . .
. . # G .
Episode 1
Step 7 | action=open_door | reward=9.00 | has_key=True | door_open=True
. . # . .
. A O . .
. . # X .
. . # . .
. . # G .
Episode 1
Step 10 | action=right | reward=48.00 | has_key=True | door_open=True
Dynamic event: goal moved and/or obstacle inserted.
Episode 1 finished | success=True | steps=10 | total_reward=70.00
Install dependencies:
python3 -m pip install -r requirements.txtValidate the repo:
openenv validate .Run the environment server:
python3 -m server.app --port 7860Validate the live server:
openenv validate http://127.0.0.1:7860Run the root submission inference script directly:
python3 inference.pyRun the same inference flow against the running server:
python3 inference.py --base-url http://127.0.0.1:7860Run the reproducible baseline JSON summary:
python3 baseline_inference.py --episodes-per-task 4Train the DQN stack:
python3 -m agent_arena.trainer.train --results-path experiment_results.jsonRender analysis plots:
python3 -m agent_arena.plots.plot_metrics --results-path experiment_results.json --output-dir plotsVisualize a rollout:
python3 -m agent_arena.demo.visualize --policy expert --dynamic-goal --episodes 1This repo is ready for Docker-based Space deployment. The submission runner variables referenced on the dashboard are:
API_BASE_URLMODEL_NAMEAPI_KEY- optional
ENV_BASE_URLfor remote inference mode
inference.py falls back to the heuristic baseline when no proxy variables are present locally, but in submission mode it uses the injected API_BASE_URL and API_KEY with the OpenAI client and routes action selection through the provided LLM proxy.
openenv validate .passesopenenv validate http://127.0.0.1:7860passespython3 inference.py --episodes-per-task 1passespython3 inference.py --base-url http://127.0.0.1:7860 --episodes-per-task 1passespython3 baseline_inference.py --episodes-per-task 4passes- Root
plots/contains generated experiment artifacts
Agents trained in static environments fail under dynamic conditions.


