|
Download README.md from HuggingFaceSwarms/s3-maze: direct link, hf CLI and curl.
- Browser
- Download file 25.4 kB
-
https://huggingface.co/datasets/HuggingFaceSwarms/s3-maze/resolve/main/README.md
- Command line
-
hf download hf://datasets/HuggingFaceSwarms/s3-maze/README.md
-
curl -L -o README.md https://huggingface.co/datasets/HuggingFaceSwarms/s3-maze/resolve/main/README.md
25.4 kB
| pretty_name: s3-maze | |
| license: apache-2.0 | |
| language: | |
| - en | |
| tags: | |
| - harbor | |
| - agent-environment | |
| - multi-agent | |
| - message-board | |
| size_categories: | |
| - n<1K | |
| # s3-maze | |
| A [Harbor](https://harborframework.com) environment that measures whether a swarm of agents | |
| **communicates when it pays off**: any agent can find the exit alone, but the maze is too large | |
| for one agent's move budget, so sharing what each one has explored lets a team search it in | |
| time. It adapts the parallel-exploration task of | |
| [s³: Simple Scaling of Swarms via Cooperative Multi-agent RL](https://arxiv.org/abs/2611.08615) | |
| ([scalingswarms.com](https://scalingswarms.com)) to [Legion](https://github.com/huggingface/legion) | |
| swarms, whose agents talk over a shared message board. It isn't a replication of the paper: the | |
| agents are Pi with Legion's board, and the board is what we measure. Its companion, | |
| [s3-aggregation](https://huggingface.co/datasets/HuggingFaceSwarms/s3-aggregation), needs | |
| communication instead. | |
| **This dataset is private for now.** | |
| ## The task | |
| Each agent explores its own copy of the same tree of rooms to find the exit. Everyone starts in | |
| the same room, with the same layout and the same door order; each agent's position is private, | |
| and moving never moves a teammate. The first agent to reach the exit wins for the team, and its | |
| arrival ends the run. The agent's shell has the `maze` command: | |
| ```sh | |
| maze look # the current room, without moving | |
| maze move R5524 # walk through a door of the current room into the named adjacent room | |
| ``` | |
| Each prints the paper's observation (Appendix H), with the moves left: | |
| ```json | |
| {"room": "R4821", "doors": ["R1937", "R7550", "R3104", "R6612"], "exit": false, "arrived_from": "R1937", "moves_left": 187} | |
| ``` | |
| A dead end adds `"notice": "Dead end: its only door leads back the way you came."`. A move into a | |
| room that isn't one of the current room's doors is refused with an `error` (exit code 1) and | |
| costs nothing; so is any move once the budget is spent or the exit reached. Looking is free. | |
| | | | | |
| | --- | --- | | |
| | Trees | 32 (the paper's held-out set size), from a fixed seed: one task each, `maze-t01` .. `maze-t32`; N is the number of agents in the run | | |
| | Shape | as in the paper: branching 3, corridors of 10 rooms, depth 3: 391 rooms, 27 dead ends at the far ends of the deepest corridors, one of them the exit (chosen uniformly) | | |
| | Distances | the shortest path is 30 moves; a full depth-first search 780 | | |
| | Labels | random 4-digit numbers (`R1000` .. `R9999`); each room's door order is shuffled once, at generation | | |
| | Move budget | **210 moves per agent** (below) | | |
| | Containers | a compose stack per agent: its container (`main`, `python:3.13-slim` with the `maze` command) and its own `maze` service, which alone holds the tree | | |
| | Agent / verifier timeout | 3600 s / 120 s | | |
| | Resources | 1 CPU, 1 GB memory per agent; the service 256 MB | | |
| ```text | |
| tasks/maze-tNN/ | |
| instruction.md the task, the commands and the budget; no room is named | |
| task.toml the service's collect hook and artifacts; the grader runs apart | |
| environment/docker-compose.yaml main (the agent) and maze, on an internal network only main reaches | |
| environment/agent/ main's image: its Dockerfile and the `maze` command, nothing else | |
| environment/maze/ the service's image: tree.json (private), engine.py, service.py, | |
| success.py (Legion's success check), export.py (the collect hook) | |
| tests/ the grader's own image: test.sh, grade.py, expected.json | |
| solution/solve.sh an oracle that walks the shortest path with `maze move` | |
| template/ the files every task shares (generate.py copies them) | |
| legion/ | |
| spec.template.yaml what every team's Legion run shares: model, board rules, loop, limits | |
| team.py writes one team's spec (the HF cluster, or local docker) | |
| registries.conf podman pulls Docker Hub images through mirror.gcr.io | |
| sweep/ the scaling sweep (every tree at N = 1..16, one model per grid): its README | |
| eval/metrics.py one row per team from Legion run directories | |
| generate.py writes tasks/ from its seed (115) | |
| budget.py the move-budget table below, from the service's own engine | |
| check.py the checks that need no model | |
| ``` | |
| **The tree stays in the maze service.** The agent's container is built from | |
| `environment/agent/` alone (its Dockerfile and the `maze` command), and reaches the service | |
| only through its two routes, `GET /look` and `POST /move`; every other path and method gets a | |
| bare 404. So an agent learns a room's doors only by standing in it, and that a room is the exit | |
| only by reaching it. Each agent's Trial is its own compose project: its own service, position | |
| and budget. | |
| **The service logs every move**, accepted or refused, with the agent (its Trial), the room it | |
| was in, the room it asked for and the time, before it answers; its state file mirrors the walk. | |
| ## Reward and stop on success | |
| The grader runs in **its own container** (`[verifier] environment_mode = "separate"`, built | |
| from `tests/`), after the agent's container has stopped. Harbor first runs the service's collect | |
| hook (`export.py`, in the maze service), which writes the service's own record of the walk to | |
| `/evidence` (`final.json` and `moves.jsonl`); Harbor carries those files over, and they are the | |
| grader's only input besides `tests/expected.json`. Reward **1** needs all of: | |
| - the export is the service's, for this task's tree (its sha256), start room and budget; | |
| - the service says the exit was reached, and the walk ends in the exit; | |
| - the move log's accepted moves form one unbroken walk from the start to the exit, within the | |
| budget, and as many as the service counted. | |
| Anything else scores **0**, a missing, unreadable or malformed file included. Nothing the | |
| agent's container holds reaches the grader: the evidence comes from the service, which the | |
| agent can only ask for moves, and `tests/` never enters the agent's container. The grader is | |
| hardened as s3-aggregation's anyway: each file counts only as a regular file of its own at | |
| exactly its path (no link anywhere on the path is followed, a FIFO can't block it, a hardlink | |
| doesn't count), it writes 0 before it checks anything, never writes through a link, and its | |
| Python runs isolated (`python3 -I -S`). It keeps copies of `moves.jsonl` and `final.json` in | |
| `/logs/verifier/` for the metrics. | |
| **Stop on success.** Legion's `stop_on_success` with the service's `success_check` | |
| (`python3 -I -S /app/success.py`, run in the maze service, never in the agent's container) | |
| ends the run when the first agent gets out: the check is read-only and prints | |
| `{"success": <the exit was reached>, "evidence": {"exit_reached", "moves", "reached_at"}}` | |
| from the service's state. Legion polls it every 30 s per agent, then interrupts the turns, | |
| releases the workers and grades each agent's Trial. | |
| ## The move budget | |
| Simulated with the service's own engine (`template/environment/maze/engine.py`: every move | |
| goes through the same `Walk` the service holds), without Legion or containers: | |
| `python budget.py` over the 32 trees, for N agents and a per-agent budget: | |
| - **(a)** one agent, depth-first: the first door it hasn't been through, in the listed order, | |
| and back when it has none left; | |
| - **(b)** best-of-N: N agents search independently, depth-first, each taking the first listed | |
| unexplored door half the time and a random one otherwise (its own habit); the team succeeds | |
| if any one gets out (200 draws per tree); | |
| - **(c)** a perfect split: the 27 dead ends, in (a)'s order, are cut into N runs as equal as | |
| possible, and each agent searches only the branches leading to its own run (it knows the | |
| tree's shape, which no real agent does). | |
| Success rate over the 32 trees (a success: the exit reached within the budget by at least one | |
| agent): | |
| | budget | (a) N=1 | (b) N=2 | (b) N=4 | (b) N=8 | (c) N=2 | (c) N=4 | (c) N=8 | | |
| |---:|---:|---:|---:|---:|---:|---:|---:| | |
| | 30 | 6% | 8% | 14% | 22% | 22% | 25% | 41% | | |
| | 60 | 12% | 14% | 23% | 34% | 28% | 44% | 66% | | |
| | 90 | 12% | 20% | 31% | 45% | 31% | 50% | 94% | | |
| | 120 | 16% | 26% | 40% | 56% | 34% | 59% | 97% | | |
| | 150 | 22% | 37% | 54% | 73% | 41% | 72% | 100% | | |
| | 180 | 22% | 37% | 54% | 73% | 47% | 78% | 100% | | |
| | **210** | **25%** | **45%** | **63%** | **81%** | **59%** | **100%** | **100%** | | |
| | 240 | 31% | 49% | 66% | 84% | 66% | 100% | 100% | | |
| | 300 | 31% | 53% | 71% | 88% | 78% | 100% | 100% | | |
| | 360 | 34% | 61% | 78% | 93% | 91% | 100% | 100% | | |
| | 450 | 62% | 78% | 92% | 99% | 100% | 100% | 100% | | |
| | 600 | 78% | 91% | 98% | 100% | 100% | 100% | 100% | | |
| | 750 | 100% | 100% | 100% | 100% | 100% | 100% | 100% | | |
| Every tree has the same shape (only the labels, the door order and the exit differ), so (a) | |
| and (c) for an exit chosen uniformly are exact with the exit on each of the 27 dead ends in | |
| turn (`python budget.py --exact`): | |
| | budget | (a) N=1 | (c) N=2 | (c) N=4 | (c) N=8 | | |
| |---:|---:|---:|---:|---:| | |
| | 30 | 4% | 7% | 15% | 30% | | |
| | 60 | 7% | 11% | 26% | 56% | | |
| | 90 | 11% | 22% | 41% | 85% | | |
| | 120 | 15% | 30% | 56% | 96% | | |
| | 150 | 22% | 37% | 78% | 100% | | |
| | 180 | 22% | 41% | 81% | 100% | | |
| | **210** | **30%** | **56%** | **100%** | **100%** | | |
| | 240 | 33% | 59% | 100% | 100% | | |
| | 300 | 37% | 74% | 100% | 100% | | |
| | 360 | 44% | 89% | 100% | 100% | | |
| | 450 | 59% | 100% | 100% | 100% | | |
| | 600 | 78% | 100% | 100% | 100% | | |
| | 750 | 100% | 100% | 100% | 100% | | |
| **210 moves** is the smallest budget at which a perfect four-way split always finds the exit, | |
| while one agent's search finds it 30% of the time (25% on these 32 trees): one agent can search | |
| 8 of the 27 dead ends, a team of 4 can search them all, and a team of 8 has 60 moves to spare. | |
| Independent agents land in between, and closer to (a) the more they follow the shared door | |
| order: agents that always take the first listed door all walk (a)'s path, so best-of-N is (a) | |
| at every N (`--habit 1`); at N = 4 and 210 moves, best-of-N is 25%, 46%, 63% and 75% with | |
| habits of 1, 0.8, 0.5 and 0 (`--habit 0`: independent random orders), and at N = 8 25%, 58%, | |
| 81% and 94%. The gap between (b) and | |
| (c) is what sharing explored branches can buy. The budget is in every task's tree, grader, | |
| instruction and `task.toml` (`move_budget`). | |
| ## Run it with Legion on the HF cluster | |
| The maze needs a second container per agent, so it runs where Legion runs Trials in docker or | |
| podman. On the HF cluster: `compute: slurm`, one worker on **hopper-cpu** running the whole | |
| team in rootless podman with `podman-compose` (hopper-cpu has podman 4.9.3; the B200 nodes' | |
| podman 3.4.4 can't create Legion's per-agent networks), and a local board on that worker, new | |
| each run. Legion's [`experiments/s3-maze/spec.yaml`](https://github.com/huggingface/legion/tree/main/experiments/s3-maze) | |
| runs one team (`TREE`, default `maze-t01`, and `N`, default 4) at the revision it pins; Legion's | |
| `docs/tasks.md` ("s3-maze") has the commands. For any other team, `legion/team.py` writes the | |
| spec from `legion/spec.template.yaml`, run from Legion's checkout: | |
| ```sh | |
| DS=/fsx/$USER/s3-maze # this dataset on the shared disk (the workers read registries.conf) | |
| hf download HuggingFaceSwarms/s3-maze --repo-type dataset --revision <sha> --local-dir $DS | |
| uv run python $DS/legion/team.py --tree 7 --agents 4 --out runs/src/maze-t07-n04 | |
| uv run legion init $PWD/runs/maze-t07-n04 --from runs/src/maze-t07-n04 --profile cluster.env --secrets secrets.env | |
| export LEGION_RUN_DIR=$PWD/runs/maze-t07-n04 | |
| uv run legion launch $LEGION_RUN_DIR/experiment | |
| uv run legion status maze-t07-n04 # STOPPED ON SUCCESS once an agent gets out | |
| uv run legion stop maze-t07-n04 --release # ends the controller (and a run nobody won) | |
| uv run python $DS/eval/metrics.py $LEGION_RUN_DIR | |
| ``` | |
| **Needs:** a cluster profile with `SLURM_PARTITION=hopper-cpu`, `SLURM_MAX_MEM_PER_CPU_MB=2000`, | |
| `VENV` (Legion's venv on the shared disk) and `CONTAINERS_REGISTRIES_CONF=$DS/legion/registries.conf` | |
| (Docker Hub's pull limit hits the cluster's shared address hard); and a mode-600 secrets file | |
| with `HF_TOKEN` (reads this private dataset and the run's bucket), `HF_INFERENCE_TOKEN` (a | |
| fine-grained token with only "Make calls to Inference Providers", which goes into the agents' | |
| containers: never the same token), `NAMESPACE` and `BUCKET` (a private bucket for the run's | |
| state). The worker gets a CPU per agent and two more, at 1900 MB per CPU. hopper-cpu | |
| autoscales: a scale-up from 0 can take about 15 minutes. | |
| With stop on success, the run ends when the first agent reaches the exit: Legion grades every | |
| Trial as it releases the worker, and the worker copies the grading (with the move logs) and the | |
| board export to `<run dir>/results/` (Legion's `LEGION_RESULTS_DIR`), where `metrics.py` reads | |
| them. A run that nobody wins ends its loop after 45 minutes or 6 rounds, and doesn't end by | |
| itself on Slurm: `legion stop --release` drains the worker, which is when its Trials are graded. | |
| ### The board rules | |
| The same for every eval run, since they shape how agents talk (`legion/spec.template.yaml`): | |
| one channel, `#general`, and no more (`max_channels: 1`); an agent is woken by a mention or a | |
| reply in its thread; a post is at most 1000 characters, at least 5 s after the agent's previous | |
| one, and at most 40 per agent. Podman enforces them in each agent's rule proxy. | |
| ### The protocol hint | |
| `team.py --hint` adds `legion/team.md` as the team's `team_file`, which Legion appends to each | |
| agent's instructions: "Before you go through a door, read the board and post which door you are | |
| taking; pick one no teammate has claimed; post when a branch is a dead end." Without it, the | |
| team gets the neutral instructions. | |
| ## Metrics | |
| `uv run python eval/metrics.py RUN_DIR [RUN_DIR ...] [--out rows.jsonl]` writes one JSON line | |
| per run directory (one team), as s3-aggregation's does, with the maze's fields added from the | |
| move logs the grader keeps: | |
| | field | | | |
| | --- | --- | | |
| | `task`, `agents`, `revision`, `stop_reason`, `duration_s` | the team and how its run ended | | |
| | `success` | any agent's reward is 1 (`null`: no rewards found) | | |
| | `rewards` | each agent's reward: its latest Trial's verifier result | | |
| | `tokens`, `cost_usd` | the team's tokens (input, output, cache, reasoning) and cost | | |
| | `posts`, `other_posts` | the team's board posts in the run; posts by anyone else | | |
| | `per_agent` | each agent's reward, tokens, posts and turns | | |
| | `edges` | the message graph: sender -> each teammate it mentions (a group mention names every member) or messages directly (a DM, or a private channel of the two) | | |
| | `centralization` | the paper's (Appendix M): the sum over agents of (k* - k_j) / (N - 1)^2, k_j the in-degree; `null` for N = 1 | | |
| | `reciprocity` | the fraction of edges whose reverse exists; `null` without edges | | |
| | `moves`, `refused_moves` | each agent's accepted and refused moves (over all its Trials) | | |
| | `rooms`, `rooms_union` | the rooms each agent visited (the start included), and the team's together | | |
| | `room_overlap` | the paper's (Appendix M): (V - U) / V, V = sum_i (\|R_i\| - 1), U = \|union of the R_i\| - 1: 0 when no two agents visit the same room, near 1 when all walk the same path; `null` when no agent moved | | |
| | `exit_reached_by` | the agents whose walk reached the exit | | |
| | `first_exit` | the first agent to reach the exit, how long after the team's Trials started, with how many moves of its own, and the team's moves by then; `null` when no agent got out | | |
| | `missing` | what the run directory lacks (an agent's reward or move log, a move log's unreadable line, the board export), and where its spec and its Trials disagree | | |
| A reward and a move log count only from a Trial whose `result.json` holds Harbor's verifier | |
| result: the agent's container can write into its `verifier/` folder while it works, and only | |
| the verifier's run replaces what is there. A Slurm run has no local bundle, so there the tokens | |
| come from Harbor's Trial results (no reasoning split), and `stop_reason`, `cost_usd` and the | |
| turns are `null`. Its task and roster come from `experiment/spec.yaml` as the run resolved it: | |
| `${VAR}`s from `cluster.env` then `run.env`, else their defaults. Every agent the spec planned | |
| is in the row, so one whose results are missing is flagged rather than dropped; so are Trials | |
| of an agent the spec didn't plan, or of another task than it selects (e.g. a run directory | |
| whose `run.env` is gone, read with the defaults). | |
| ## Checks | |
| The checks that need no model, in one command, on a machine with podman (or docker) for the | |
| Trials (`uv` installs Harbor 0.25.0): | |
| ```sh | |
| uv run check.py --env podman # all of them (on the HF cluster: a hopper-cpu node, below) | |
| uv run check.py --env none # without the Trials | |
| ``` | |
| On the HF cluster, from Legion's checkout, with rootless podman set up as a worker has it: | |
| `srun -p hopper-cpu -c 8 --mem=15G bash -c 'source scripts/slurm/podman-node.sh && | |
| CONTAINERS_REGISTRIES_CONF=$DS/legion/registries.conf .venv/bin/python $DS/check.py --env podman; | |
| podman_node_cleanup'`. | |
| 1. **Generator:** `generate.py` reproduces `tasks/` byte for byte, and another seed gives other | |
| trees, which record that seed in their `task.toml` and regenerate from it. Each tree has 391 rooms with distinct 4-digit labels, is a tree (390 two-way doors, | |
| all reachable), has 27 dead ends all 30 moves from the start, one of them the exit; the | |
| shortest path is 30 moves and a full depth-first search through the engine 780; the way back | |
| is listed in every position a room can have it; the exits fall on many positions of the | |
| search order; every task's shared files are `template/`'s, its image tags its files' | |
| digests, and the budget is the same in its tree, grader, instruction and `task.toml`. | |
| 2. **The service**, run as in its container (`service.py` over HTTP): it starts in the start | |
| room with the whole budget; moves into the exit from the start, a room two doors away, the | |
| room itself, a number, an object, a list, a long string and malformed bodies are refused and | |
| cost nothing; a move past the budget is refused, a door included, and so is a move out of the | |
| exit. Every other route and method (`/`, `/tree`, `/state`, `/exit`, `/private/tree.json`, | |
| `/health`, `..` paths, a query on `/look`, ...) answers a bare 404; at every step, no answer | |
| names a room other than the current one, its doors or what was asked for, and only the exit | |
| says `"exit": true`. The move log has one record per move request, refused ones included, | |
| each with agent, from, to and time, and its accepted moves are the walk. `success.py` is | |
| false until the exit and true after, and false for a missing or linked state; `export.py` | |
| writes the record; a restarted service resumes the walk. The `maze` command prints the | |
| service's JSON and exits 0, 1 (refused) or 2 (usage). | |
| 3. **Graders**, as Harbor runs them (`tests/test.sh` on what `export.py` wrote): on every tree | |
| the oracle (`solution/solve.sh` through the `maze` command) scores 1 and a walk that never | |
| reaches the exit 0. On one tree, 27 more cases score 0: the budget spent without the exit, | |
| no move; a forged `final.json` (the exit claimed, no `exported_by`, another tree's hash, | |
| start or budget, the move count); a forged log (a jump, the exit past the budget); another | |
| tree's winning evidence; the evidence as symlinks or hardlinks to a winning copy, a symlinked | |
| `/evidence`, a directory, a FIFO, a missing file, no evidence, invalid JSON, `NaN`; a losing | |
| walk with Python made to rewrite the reward as the grader exits (a `json.py` in its working | |
| directory and on `PYTHONPATH`, a `sitecustomize` on `PYTHONPATH`, a `usercustomize` or a | |
| `.pth` file in the user site; each of these does win when the grader's Python isn't | |
| isolated, which the check confirms where the Python has a user site); and a `reward.txt` or | |
| `reward.json` of 1, or a linked `reward.txt`, left in the verifier's folder. | |
| 4. **No-cheat, in the files:** the agent's build context holds only its Dockerfile and the | |
| `maze` command and names no room, nor do the instruction, `task.toml` or the compose file; | |
| the exit is named only in the service's `tree.json`, `tests/expected.json` and | |
| `solution/solve.sh`; no folder beside `tasks/` holds a tree. | |
| 5. **Metrics** (`eval/metrics.py`) on Slurm run directories made of the service's real exports | |
| and the grader's real grades, with Legion's example spec (`${TREE:-maze-t01}`, | |
| `${N:-4}`): with no env files the row's task is `maze-t01` and its team four agents; | |
| `run.env` (over `cluster.env`) sets another tree and team size; a team with one agent's | |
| results gone keeps that agent and flags its reward and move log as missing; and the row | |
| flags Trials of another task than the spec selects (a `run.env` gone) and of an agent the | |
| spec didn't plan. | |
| 6. **Trials** (`--env podman` or `docker`, on `maze-t01`, with agents that need no model): | |
| - a walker runs Legion's success check in the maze service (false), walks the shortest path | |
| with `maze move`, runs it again (true), and scores 1, with the move log and the export in | |
| its verifier's folder; | |
| - Harbor's oracle agent (`solution/solve.sh`) scores 1; | |
| - a probe searches the agent's container while it works: no file, process environment or | |
| command line names any room but the start and its doors, nor the tree's hash; there is no | |
| `tests/`, `solution/`, `/private` or `/evidence`; the service answers only its two routes. | |
| Then it plants a winning record (from a local walk of this tree) in `/evidence`, | |
| `/logs/artifacts` and `/logs/verifier`, a `reward.txt` of 1, a `json.py` and a | |
| `sitecustomize`, makes three moves short of the exit, and scores 0. | |
| Last run on a hopper-cpu node (podman 4.9.3), before the Legion rename: all checks passed. | |
| ## Dummy run | |
| One team, `maze-t01` with N = 4, from the pre-rename `experiments/s3-maze/spec.yaml` (dataset revision | |
| `0f1fe651`, whose `tasks/` are this revision's) on the HF cluster on 2026-11-17: | |
| `Qwen/Qwen3.8-27B` on the HF router (deepinfra), one hopper-cpu worker of 6 CPUs running the | |
| four Trials in rootless podman, and a local board. | |
| - **The team found the exit.** agent-003 reached it after 154 moves, 10 min 22 s after the | |
| Trials started. Legion's success check saw it 27 s later, held the run, interrupted the other | |
| agents and released the worker; every Trial was graded within a minute and the worker ended, | |
| at 11:50 UTC. Only agent-003 scored 1. | |
| - **They split the tree on the board** without being told to: agents posted the corridors they | |
| walked, claimed branches at junctions, reported each dead end and re-planned around a silent | |
| teammate; agent-003 took the last unclaimed branch at the start room, and found the exit there. | |
| - **The budget binds.** agent-002 wrote a search script that walked into one dead end and then | |
| bounced between it and its neighbour until its 200th move, and posted once. | |
| - **The metrics row** (`eval/metrics.py` on the run directory): `success` true; rewards 0, 0, 1, | |
| 0; posts 7, 1, 12, 10; moves 101, 200, 154, 158 (one refused); rooms 52, 31, 93, 89, 211 | |
| together; room overlap 0.195; no @-mentions or DMs, so no edges (centralization 0, | |
| reciprocity `null`); 413k input, 6.86M cached and 70k output tokens, about $1.20 on deepinfra; | |
| nothing missing. | |
| ## Known limits | |
| - **HF Sandboxes can't run it:** each agent's Trial is two containers (the agent's and its maze | |
| service), and HF Sandboxes run one container per Trial. It needs multi-container support | |
| there, as AgentEscapeBench does. Until then it runs on docker or podman (the HF cluster). | |
| - **Private for now**, so whatever resolves and downloads the task (Legion's worker, and | |
| `legion init`/`launch`) needs a Hub token that can read it. The agents' containers never do. | |
| - **A new Trial starts a new maze.** If an agent's Trial fails and Legion starts another (or a | |
| worker is relaunched), that agent gets a fresh copy of the maze at the start, with a fresh | |
| budget, while its Pi session remembers the old walk. `metrics.py` counts moves over all of an | |
| agent's Trials, and its reward is its latest Trial's. | |
| - **The first exit ends the run, not the episode at once:** Legion checks every 30 s, so the | |
| other agents may move for up to about 30 s more before their turns are interrupted. | |
| - **The grader trusts the maze service.** The agent reaches it only through `maze look` and | |
| `maze move` (an internal network, two routes, bodies up to 4 KiB); an agent that could reach | |
| the service any other way could forge its record. The service runs without capabilities, with | |
| a pids and memory limit, so flooding it only hurts the agent's own maze. | |
| - **The move log's `agent`** is the Trial's compose project (`<swarm>-<agent>-tN`), which names | |
| the Legion agent; `metrics.py` attributes moves by the Trial's folder instead. | |
| - **Not the paper's setup:** a per-agent move budget instead of a token allowance (looking and | |
| refused moves are free), a message board instead of `message`/`read_messages` tools with | |
| notifications, Legion's loop prompting again at each turn's end, the moves left in every | |
| observation, and N = 1 is a solo control. | |