The Dataset Viewer has been disabled on this dataset.

Causal GPT-RL — Unity ML-Agents trajectories

Recorded Unity ML-Agents trajectories packaged as Minari datasets — offline-RL datasets spanning continuous and discrete action spaces. Any offline-RL method can train on them; we built them to develop Causal GPT-RL, our new approach that works across both space types. Every environment ships an expert tier; eight ship a full quality ladder (expert + calibrated medium/simple) synthesized by degrading the stock policy — Gaussian action-noise ranges for the continuous scenes, softmax-temperature ranges on the policy logits for the discrete goal games.

Tiers are keyed to Minari-normalized skill between a random-policy 0.0 anchor and the stock expert 1.0targets simple 0.60 / medium 0.80 / expert 1.0 (envs land at simple 0.60–0.61, medium 0.80–0.82). The degradation is not a single constant: it is drawn per episode from a calibrated range (the group/team scenes — DungeonEscape, SoccerTwos — draw per match instead), so each tier's mean hits its target while the episodes span a continuous band of skill instead of piling at one point.

Companion repos

Contents

Dataset id Episodes Transitions Observation Action
unity/crawler/expert-v0 1,048 1,000,002 Tuple(Box(126), Box(32)) Box(20, [-1, 1])
unity/crawler/medium-v0 1,129 1,000,000 Tuple(Box(126), Box(32)) Box(20, [-1, 1])
unity/crawler/simple-v0 1,344 1,000,000 Tuple(Box(126), Box(32)) Box(20, [-1, 1])
unity/pushblock/expert-v0 52,801 1,000,000 Tuple(Box(105), Box(105)) Discrete(7)
unity/pushblock/medium-v0 38,878 1,000,000 Tuple(Box(105), Box(105)) Discrete(7)
unity/pushblock/simple-v0 26,717 1,000,000 Tuple(Box(105), Box(105)) Discrete(7)
unity/soccer-twos/expert-v0 14,588 1,000,816 ego Dict wrapping Tuple(Box(264), Box(72)) ego Dict wrapping MultiDiscrete([3, 3, 3])
unity/soccer-twos/medium-v0 12,820 1,002,592 ego Dict wrapping Tuple(Box(264), Box(72)) ego Dict wrapping MultiDiscrete([3, 3, 3])
unity/soccer-twos/simple-v0 11,220 1,002,772 ego Dict wrapping Tuple(Box(264), Box(72)) ego Dict wrapping MultiDiscrete([3, 3, 3])
unity/dungeon-escape/expert-v0 35,787 1,003,523 ego Dict wrapping Tuple(Box(10), Box(360), Box(1)) ego Dict wrapping Discrete(7)
unity/dungeon-escape/medium-v0 28,548 1,012,166 ego Dict wrapping Tuple(Box(10), Box(360), Box(1)) ego Dict wrapping Discrete(7)
unity/dungeon-escape/simple-v0 22,509 1,003,589 ego Dict wrapping Tuple(Box(10), Box(360), Box(1)) ego Dict wrapping Discrete(7)
unity/3dball-hard/expert-v0 1,009 1,000,008 Tuple(Box(27), Box(18)) Box(2)
unity/3dball-hard/medium-v0 1,250 1,000,008 Tuple(Box(27), Box(18)) Box(2)
unity/3dball-hard/simple-v0 1,655 1,000,008 Tuple(Box(27), Box(18)) Box(2)
unity/pyramids/expert-v0 5,348 1,000,000 Tuple(Box(56), Box(56), Box(56), Box(4)) Discrete(5)
unity/pyramids/medium-v0 4,159 1,000,000 Tuple(Box(56), Box(56), Box(56), Box(4)) Discrete(5)
unity/pyramids/simple-v0 3,042 1,000,000 Tuple(Box(56), Box(56), Box(56), Box(4)) Discrete(5)
unity/worm/expert-v0 1,000 1,000,000 Box(64) Box(9, [-1, 1])
unity/worm/medium-v0 1,000 1,000,000 Box(64) Box(9, [-1, 1])
unity/worm/simple-v0 1,000 1,000,000 Box(64) Box(9, [-1, 1])
unity/walker/expert-v0 1,458 1,000,010 Box(243) Box(39, [-1, 1])
unity/walker/medium-v0 1,712 1,000,000 Box(243) Box(39, [-1, 1])
unity/walker/simple-v0 2,247 1,000,000 Box(243) Box(39, [-1, 1])

All environments, datasets, and stock policies use ML-Agents release_23. Each dataset is stored at <name>/<tier>/data/main_data.hdf5 with a sibling metadata.json (minari_version 0.5.3). SoccerTwos and DungeonEscape use an ego-agent schema — observations["agents"]["agent_0"], actions["agents"]["agent_0"] — one ego episode per physical agent; split by match_id (see docs/reproduction.md).

Loading

from pathlib import Path
from huggingface_hub import snapshot_download
import minari

snapshot_download(
    repo_id="ccnets/causal-gpt-rl-unity-datasets",
    repo_type="dataset",
    allow_patterns="worm/**",                       # one env; drop to fetch all
    local_dir=Path.home() / ".minari" / "datasets" / "unity",
)
dataset = minari.load_dataset("unity/worm/expert-v0")
# calibrated tiers: minari.load_dataset("unity/worm/medium-v0" | ".../simple-v0")
print(dataset.observation_space, dataset.action_space)

Quality ladders

Why these tiers look the way they do. In a normal RL pipeline, medium/simple data would come from early training checkpoints on the way to the expert. We don't have those checkpoints — only the final expert policy — so each tier is reduced backward from the expert: instead of one constant perturbation (a single degraded point), every episode draws its skill from a calibrated range, so the tier reproduces the distribution of skill a checkpoint spread would have.

Each ladder is a monotone skill sequence built from ONE stock policy: expert is the unmodified policy, medium/simple degrade it progressively. The degradation is calibrated so the tier mean hits its normalized target while episodes cover a continuous skill band (seed 2310000):

  • continuous scenes (crawler, worm, walker, 3dball-hard) add Gaussian action noise, noise_std sampled per episode from a calibrated range;
  • discrete goal games sample the policy's own action distribution via softmax(logits/T) on the exposed discrete logits — higher T picks plausible 2nd/3rd-best actions (smooth, in-distribution degradation, unlike epsilon-style uniform-random swaps which are bimodal and off-distribution). PushBlock and Pyramids each sample T per episode from a calibrated range (each episode its own skill level, like a spread of early-training checkpoints);
  • cooperative discrete DungeonEscape samples a softmax temperature T per group per match from a calibrated range — all three agents in a group share one T, so each match is one coherent skill level (like an early-training checkpoint); competitive self-play SoccerTwos samples a softmax temperature T per team per match from a (wider) calibrated range — the two teams draw independently, so each match pairs two skill levels (a random gap, like cross-checkpoint league play).

Normalization is (candidate − random) / (expert − random) on each env's tier metric.

env tier metric medium simple noise method
crawler episode return 0.82 0.60 per-episode noise_std range
worm episode return 0.80 0.60 per-episode noise_std range
walker episode return 0.82 0.61 per-episode noise_std range
3dball-hard episode return 0.80 0.60 per-episode noise_std range
pushblock step-reward 0.80 0.60 per-episode softmax temperature range
pyramids step-reward 0.81 0.60 per-episode softmax temperature range
dungeon-escape step-reward 0.80 0.60 per-group softmax temperature range
soccer-twos match score ≈0.80 ≈0.60 per-team softmax temperature range

soccer-twos figures are approximate: self-play stays balanced, so tier skill cannot be read off the shipped returns and comes from side-swapped calibration. Sparse-reward scenes (pyramids, pushblock, dungeon, soccer) have a physically bimodal per-episode outcome (solve vs. time-out), so the episode-return histogram barely separates the tiers. For the goal games (pushblock, pyramids, dungeon-escape) the tier metric is therefore mean step-reward = return / episode length, which grades how efficiently the goal is reached — a continuous skill signal — normalized expert = 1 / random = 0 against the shipped expert-v0 step-reward anchor (pushblock 0.3542, pyramids 0.01244, dungeon-escape 0.01946). simple targets 0.60 and the shipped tiers all sit at ≈0.60 (SoccerTwos, scored by side-swapped match score rather than step-reward, is approximate); medium spans 0.80–0.82.

"termination rate" below = fraction of episodes ending on the env's terminal condition — a fall for Crawler/Walker/3DBallHard, a solved push for PushBlock, maze solve ("reach") for Pyramids; Worm never terminates (truncated at 1000).

Per-environment ladder tables — exact ranges, anchors, mean returns, rates

Crawler — anchors: expert 2576.4899, random −0.88

tier norm. return noise_std range mean return term. rate mean ep length
expert-v0 1.00 -- 2576.4899 0.077 954.20
medium-v0 ≈0.82 0.15–0.23 2113.0960 0.209 885.74
simple-v0 ≈0.60 0.21–0.32 1557.9818 0.460 744.05

Worm — anchors: expert 1044.1063, random 0.80 (never terminates)

tier norm. return noise_std range mean return term. rate mean ep length
expert-v0 1.00 -- 1044.1063 0.000 1000.00
medium-v0 ≈0.80 0.09–0.15 839.4910 0.000 1000.00
simple-v0 ≈0.60 0.15–0.22 632.4776 0.000 1000.00

Walker — anchors: expert 1363.6454, random −0.49 (high intrinsic return variance)

tier norm. return noise_std range mean return term. rate mean ep length
expert-v0 1.00 -- 1363.6454 0.512 685.88
medium-v0 ≈0.82 0.05–0.11 1122.0456 0.652 584.11
simple-v0 ≈0.61 0.09–0.15 835.2383 0.822 445.04

3DBallHard — anchors: expert 99.1077, random 0.84 (capped balance: near-bimodal)

tier norm. return noise_std range mean return term. rate mean ep length
expert-v0 1.00 -- 99.1077 0.001 991.09
medium-v0 ≈0.80 0.28–0.38 79.6258 0.341 800.01
simple-v0 ≈0.60 0.31–0.44 59.7502 0.612 604.23

PushBlock — tier metric is mean step-reward (return / length); step-reward anchors: expert 0.354242 (shipped expert-v0, 52,801 ep), random ≈−0.0005 (soft). Each tier samples T per episode from a calibrated range (each episode its own skill level, like a spread of early-training checkpoints). Higher T still solves but wanders more, so the return stays high (≈4.9) while step-reward falls with efficiency. term. rate = solved.

tier norm. step-reward T (per episode) mean step-reward mean return solved rate mean ep length
expert-v0 1.00 -- 0.354242 4.972084 ≈1.00 18.94
medium-v0 0.80 U(2.1, 3.2) 0.282729 4.962205 0.998 25.72
simple-v0 0.60 U(3.25, 4.75) 0.213217 4.946129 0.997 37.43

Pyramids — tier metric is mean step-reward (return / length); step-reward anchors: expert 0.012437 (shipped expert-v0, 5,348 ep), random −0.001 (sparse: policy always times out at random). Each tier samples T per episode from a calibrated range (each episode its own skill level, like a spread of early-training checkpoints). Higher T reaches the goal less directly (longer episodes) so step-reward falls while return stays near expert. term. rate = mazes reached/solved.

tier norm. step-reward T (per episode) mean step-reward mean return reach rate mean ep length
expert-v0 1.00 -- 0.012437 1.795309 0.9906 186.99
medium-v0 0.81 U(2.7, 4.9) 0.009852 1.743200 0.991 240.44
simple-v0 0.60 U(4.8, 7.1) 0.007077 1.625600 0.977 328.73

DungeonEscape — cooperative goal game; tier metric is mean step-reward (return / length); step-reward anchors: expert 0.019459 (shipped expert-v0, 35,787 ego ep), random ≈0.00015. A softmax temperature T is sampled per cooperative group per match from a calibrated range and shared by all three agents (one coherent skill level per match, like an early-training checkpoint); higher T reaches the exit less efficiently so step-reward falls while the group still often succeeds. Group success any(agent_return > 0) (group_metadata.jsonl) therefore stays high across tiers and no longer separates them — step-reward does.

tier norm. step-reward T range (per group) mean step-reward group success mean ep length
expert-v0 1.00 stock (no noise) 0.019459 0.9532 28.04
medium-v0 0.80 U(1.5, 3.0) 0.015612 0.9145 35.45
simple-v0 0.60 U(3.0, 4.0) 0.011717 0.8507 44.59

SoccerTwos — tier metric is side-swapped match score vs the fixed stock policy (self-play, so mean shipped return ≈ −0.04 for both tiers and does not track skill; figures are calibration estimates). Each team draws a softmax temperature T independently per match from a (wide) calibrated range on the exposed MultiDiscrete logits, shared by its two agents — so each match pairs two independently-drawn skill levels (a random gap = cross-checkpoint league play). A tier is set by the ego team's own drawn T; the norm is that band's mean side-swapped match score vs the fixed expert. term. rate = matches always terminate.

tier approx. norm. skill T (per team/match) matches mean ep length
expert-v0 1.00 stock (no noise) 3,647 68.61
medium-v0 ≈0.80 U(1.3, 2.6) 3,205 78.21
simple-v0 ≈0.60 U(2.1, 3.4) 2,805 89.37

Build & reproduction steps (per-env recording recipe): see docs/reproduction.md.

Provenance & attribution

  • Trajectories were generated by running Unity ML-Agents material (the builds and stock policies are Apache-2.0; see the envs repo for provenance and licenses).
  • The trajectory data in this repo is an original recording licensed CC-BY-4.0. Please attribute ccnets — Causal GPT-RL and note the Unity ML-Agents source environment.

License

Creative Commons Attribution 4.0 International (CC-BY-4.0). See LICENSE.

Downloads last month
471