docs: restructure card (overview + unified ladder summary + collapsible per-env tables); move reproduction recipe to docs/reproduction.md
Browse files- README.md +203 -359
- docs/reproduction.md +99 -0
README.md
CHANGED
|
@@ -1,359 +1,203 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-4.0
|
| 3 |
-
tags:
|
| 4 |
-
- reinforcement-learning
|
| 5 |
-
- unity-ml-agents
|
| 6 |
-
- minari
|
| 7 |
-
- causal-gpt-rl
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
# Causal GPT-RL — Unity ML-Agents trajectories
|
| 11 |
-
|
| 12 |
-
Recorded Unity ML-Agents trajectories packaged as
|
| 13 |
-
[Minari](https://minari.farama.org) datasets
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
| 35 |
-
|
|
| 36 |
-
| `unity/
|
| 37 |
-
| `unity/
|
| 38 |
-
| `unity/
|
| 39 |
-
| `unity/
|
| 40 |
-
| `unity/
|
| 41 |
-
| `unity/
|
| 42 |
-
| `unity/
|
| 43 |
-
| `unity/
|
| 44 |
-
| `unity/
|
| 45 |
-
| `unity/
|
| 46 |
-
| `unity/
|
| 47 |
-
| `unity/
|
| 48 |
-
| `unity/
|
| 49 |
-
| `unity/
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
`
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
`
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
`
|
| 66 |
-
`
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
|
| 127 |
-
|
| 128 |
-
`
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
finish all in-flight matches after crossing one million transitions.
|
| 205 |
-
|
| 206 |
-
Final validation: 1,000,816 transitions, 14,588 terminated episodes, 3,647
|
| 207 |
-
complete matches, zero truncations, zero NaN/Inf/shape/range errors, and every
|
| 208 |
-
match has equal linked lengths with two wins and two losses. Mean agent episode
|
| 209 |
-
length is 68.6054 and mean return is -0.034302.
|
| 210 |
-
|
| 211 |
-
### DungeonEscape release_23
|
| 212 |
-
|
| 213 |
-
1. Use the stock release_23 `DungeonEscape.onnx` shared POCA policy with the
|
| 214 |
-
model removed from the Unity build so each agent is driven externally.
|
| 215 |
-
2. Record each physical agent independently. Preserve its three local sensor
|
| 216 |
-
leaves (rigid-body state 10, stacked ray perception 360, has-key flag 1) and
|
| 217 |
-
single `Discrete(7)` action.
|
| 218 |
-
3. Relabel every physical agent as the episode-local ego path
|
| 219 |
-
`agents.agent_0`. Three episodes sharing one `match_id` reconstruct the
|
| 220 |
-
original cooperative group; they are distinct local trajectories, not copies.
|
| 221 |
-
4. Sum ML-Agents `reward` and `group_reward` for the per-agent reward stream.
|
| 222 |
-
Determine success only at group level because an agent that dies early may
|
| 223 |
-
not receive a later positive group reward.
|
| 224 |
-
5. Split by `match_id`, never independently by ego episode.
|
| 225 |
-
|
| 226 |
-
Final validation: 1,003,523 transitions, 35,787 terminated ego episodes, 11,929
|
| 227 |
-
complete three-agent groups, 11,371 successes, 558 failures, and zero
|
| 228 |
-
NaN/Inf/shape/action-range errors. Every match links exactly three episodes.
|
| 229 |
-
|
| 230 |
-
### PushBlock release_23
|
| 231 |
-
|
| 232 |
-
1. Use the model-removed release-23 PushBlock build and drive all 32 agents
|
| 233 |
-
externally with the unmodified stock release-23 `PushBlock.onnx` policy.
|
| 234 |
-
2. Record the policy's live Unity rollouts with the release-23 collection runtime;
|
| 235 |
-
preserve the two `105`-d sensors and the single `Discrete(7)` action branch.
|
| 236 |
-
3. Stop at one million transitions and package each physical agent episode
|
| 237 |
-
independently. The final artifact contains 52,801 episodes (52,702 terminated
|
| 238 |
-
and 99 truncated at the recording boundary), mean return 4.972084, and mean
|
| 239 |
-
episode length 18.9390.
|
| 240 |
-
|
| 241 |
-
## Pyramids, Worm, and Walker release_23
|
| 242 |
-
|
| 243 |
-
Use each model-removed release-23 build with its matching unmodified stock
|
| 244 |
-
release-23 ONNX policy. Record each physical scene agent independently and
|
| 245 |
-
stop at one million transitions. The published schemas come directly from
|
| 246 |
-
the live ML-Agents behavior specs.
|
| 247 |
-
|
| 248 |
-
- **Pyramids:** 5,348 episodes, 1,000,000 transitions,
|
| 249 |
-
mean return 1.795309, mean length 186.9858,
|
| 250 |
-
5,298 terminated and 50 truncated episodes.
|
| 251 |
-
- **Worm:** 1,000 episodes, 1,000,000 transitions,
|
| 252 |
-
mean return 1044.106317, mean length 1000.0000,
|
| 253 |
-
0 terminated and 1,000 truncated episodes.
|
| 254 |
-
- **Walker:** 1,458 episodes, 1,000,010 transitions,
|
| 255 |
-
mean return 1363.645402, mean length 685.8779,
|
| 256 |
-
747 terminated and 711 truncated episodes.
|
| 257 |
-
|
| 258 |
-
### Pyramids quality ladder
|
| 259 |
-
|
| 260 |
-
Pyramids ships an `expert` tier plus two calibrated lower-skill tiers
|
| 261 |
-
(`medium`, `simple`) synthesized by adding uniform action noise to the stock
|
| 262 |
-
policy (each discrete action is resampled with probability epsilon; epsilon is
|
| 263 |
-
drawn per episode from the tier's range, seed 2310000). Pyramids is a
|
| 264 |
-
sparse-reward single-agent scene, so tiers are keyed on normalized episode return
|
| 265 |
-
between an expert 1.0 and a random 0.0 anchor (random mean return -1.0 -- the
|
| 266 |
-
policy always times out). "reach rate" is the fraction of episodes that solve the
|
| 267 |
-
maze and terminate; the rest time out at the step cap and are truncated. Because
|
| 268 |
-
the reward is sparse (solve vs. time-out), the per-episode return stays bimodal
|
| 269 |
-
even under the epsilon range; the range instead spreads the *trajectory*
|
| 270 |
-
competence that produces those outcomes. Rewards are the unmodified Unity values.
|
| 271 |
-
|
| 272 |
-
| tier | approx. normalized return | epsilon range | mean return | reach rate | mean episode length |
|
| 273 |
-
|---|---:|---:|---:|---:|---:|
|
| 274 |
-
| `expert-v0` | 1.00 | -- | 1.795309 | 0.9906 | 186.99 |
|
| 275 |
-
| `medium-v0` | ~0.80 | 0.50–0.66 | 1.228100 | 0.8827 | 538.21 |
|
| 276 |
-
| `simple-v0` | ~0.58 | 0.62–0.74 | 0.618400 | 0.6662 | 714.80 |
|
| 277 |
-
|
| 278 |
-
### 3DBallHard release_23
|
| 279 |
-
|
| 280 |
-
Use the model-removed release-23 build with the unmodified release-23 stock
|
| 281 |
-
`3DBallHard.onnx`. Preserve the two observation sensors (`27 + 18`) and the
|
| 282 |
-
continuous `Box(2)` action. Final validation: 1,000,008 transitions,
|
| 283 |
-
1,009 episodes, mean return 99.107732, mean episode
|
| 284 |
-
length 991.0882, 1 terminated and
|
| 285 |
-
1,008 truncated episodes.
|
| 286 |
-
|
| 287 |
-
The recipe ends at the Minari dataset — a portable, env-less trajectory set.
|
| 288 |
-
|
| 289 |
-
## Single-agent quality ladders (continuous control & PushBlock)
|
| 290 |
-
|
| 291 |
-
Crawler, Worm, Walker, 3DBallHard (continuous control) and PushBlock (discrete)
|
| 292 |
-
each ship an `expert` tier plus calibrated `medium`/`simple` tiers. The noise level
|
| 293 |
-
is **drawn independently per agent per episode from a calibrated range** — Gaussian
|
| 294 |
-
`noise_std` added to the continuous actions, or a per-action resample probability
|
| 295 |
-
`epsilon` on PushBlock's discrete branch (seed 2310000). Averaging over the run the
|
| 296 |
-
mean normalized return lands on the tier target (`medium` ~0.80, `simple` ~0.60)
|
| 297 |
-
while individual episodes cover a continuous band of skill instead of piling up at
|
| 298 |
-
one point. Tiers are keyed on normalized episode return between the shipped
|
| 299 |
-
`expert-v0` mean (1.0) and a random-policy (`epsilon` 1) anchor (0.0). "term. rate"
|
| 300 |
-
is the fraction of episodes that end on the environment's terminal condition — a
|
| 301 |
-
fall for Crawler / Walker / 3DBallHard, a solved push for PushBlock; Worm never
|
| 302 |
-
terminates (pure locomotion, always truncated at 1000 steps). Rewards are the
|
| 303 |
-
unmodified Unity values. PushBlock's reward is sparse (solve vs. time-out), so its
|
| 304 |
-
per-episode return is bimodal even under the range; the range spreads the
|
| 305 |
-
*trajectory* competence that produces those outcomes.
|
| 306 |
-
|
| 307 |
-
**Crawler** (`Box(20)`; anchors: expert 2576.4899, random -0.88)
|
| 308 |
-
|
| 309 |
-
| tier | approx. norm. return | noise_std range | mean return | term. rate | mean ep length |
|
| 310 |
-
|---|---:|---:|---:|---:|---:|
|
| 311 |
-
| `expert-v0` | 1.00 | -- | 2576.4899 | 0.077 | 954.20 |
|
| 312 |
-
| `medium-v0` | ~0.82 | 0.15–0.23 | 2113.0960 | 0.209 | 885.74 |
|
| 313 |
-
| `simple-v0` | ~0.60 | 0.21–0.32 | 1557.9818 | 0.460 | 744.05 |
|
| 314 |
-
|
| 315 |
-
**Worm** (`Box(9)`; anchors: expert 1044.1063, random 0.80)
|
| 316 |
-
|
| 317 |
-
| tier | approx. norm. return | noise_std range | mean return | term. rate | mean ep length |
|
| 318 |
-
|---|---:|---:|---:|---:|---:|
|
| 319 |
-
| `expert-v0` | 1.00 | -- | 1044.1063 | 0.000 | 1000.00 |
|
| 320 |
-
| `medium-v0` | ~0.80 | 0.09–0.15 | 839.4910 | 0.000 | 1000.00 |
|
| 321 |
-
| `simple-v0` | ~0.60 | 0.15–0.22 | 632.4776 | 0.000 | 1000.00 |
|
| 322 |
-
|
| 323 |
-
**Walker** (`Box(39)`; anchors: expert 1363.6454, random -0.49)
|
| 324 |
-
|
| 325 |
-
| tier | approx. norm. return | noise_std range | mean return | term. rate | mean ep length |
|
| 326 |
-
|---|---:|---:|---:|---:|---:|
|
| 327 |
-
| `expert-v0` | 1.00 | -- | 1363.6454 | 0.512 | 685.88 |
|
| 328 |
-
| `medium-v0` | ~0.82 | 0.05–0.11 | 1122.0456 | 0.652 | 584.11 |
|
| 329 |
-
| `simple-v0` | ~0.61 | 0.09–0.15 | 835.2383 | 0.822 | 445.04 |
|
| 330 |
-
|
| 331 |
-
**3DBallHard** (`Box(2)`; anchors: expert 99.1077, random 0.84)
|
| 332 |
-
|
| 333 |
-
| tier | approx. norm. return | noise_std range | mean return | term. rate | mean ep length |
|
| 334 |
-
|---|---:|---:|---:|---:|---:|
|
| 335 |
-
| `expert-v0` | 1.00 | -- | 99.1077 | 0.001 | 991.09 |
|
| 336 |
-
| `medium-v0` | ~0.80 | 0.28–0.38 | 79.6258 | 0.341 | 800.01 |
|
| 337 |
-
| `simple-v0` | ~0.60 | 0.31–0.44 | 59.7502 | 0.612 | 604.23 |
|
| 338 |
-
|
| 339 |
-
**PushBlock** (`Discrete(7)`; anchors: expert 4.9721, random ~-0.16 — soft, the `epsilon` 1 baseline is noisy)
|
| 340 |
-
|
| 341 |
-
| tier | approx. norm. return | epsilon range | mean return | term. rate (solved) | mean ep length |
|
| 342 |
-
|---|---:|---:|---:|---:|---:|
|
| 343 |
-
| `expert-v0` | 1.00 | -- | 4.972084 | ~1.00 | 18.94 |
|
| 344 |
-
| `medium-v0` | ~0.79 | 0.78–0.85 | 3.908600 | 0.863 | 408.16 |
|
| 345 |
-
| `simple-v0` | ~0.61 | 0.82–0.89 | 2.964500 | 0.705 | 560.85 |
|
| 346 |
-
|
| 347 |
-
## Provenance & attribution
|
| 348 |
-
|
| 349 |
-
- Trajectories were generated by running Unity ML-Agents material (the builds
|
| 350 |
-
and stock policies are Apache-2.0; see the envs repo for provenance and
|
| 351 |
-
licenses).
|
| 352 |
-
- The **trajectory data in this repo** is an original recording and is licensed
|
| 353 |
-
**CC-BY-4.0**. Please attribute *ccnets — Causal GPT-RL* and note the Unity
|
| 354 |
-
ML-Agents source environment.
|
| 355 |
-
|
| 356 |
-
## License
|
| 357 |
-
|
| 358 |
-
Released under the Creative Commons Attribution 4.0 International license
|
| 359 |
-
(CC-BY-4.0). See `LICENSE`.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- reinforcement-learning
|
| 5 |
+
- unity-ml-agents
|
| 6 |
+
- minari
|
| 7 |
+
- causal-gpt-rl
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Causal GPT-RL — Unity ML-Agents trajectories
|
| 11 |
+
|
| 12 |
+
Recorded Unity ML-Agents trajectories packaged as
|
| 13 |
+
[Minari](https://minari.farama.org) datasets, spanning continuous and discrete
|
| 14 |
+
action spaces for testing Causal GPT-RL across space types. Every environment
|
| 15 |
+
ships an `expert` tier; eight ship a full **quality ladder** (`expert` +
|
| 16 |
+
calibrated `medium`/`simple`) synthesized by injecting action noise into the
|
| 17 |
+
stock policy.
|
| 18 |
+
|
| 19 |
+
Tiers are keyed to Minari-normalized skill between a random-policy `0.0` anchor
|
| 20 |
+
and the stock expert `1.0` — **targets `simple` 0.60 / `medium` 0.80 / `expert`
|
| 21 |
+
1.0** (envs land at simple 0.56–0.61, medium 0.78–0.82). The noise is not a
|
| 22 |
+
single constant: it is drawn **per episode from a calibrated range** (cooperative
|
| 23 |
+
scenes sample per group/team per match), so each tier's *mean* hits its target
|
| 24 |
+
while the episodes span a continuous band of skill instead of piling at one point.
|
| 25 |
+
|
| 26 |
+
**Companion repos**
|
| 27 |
+
- Model-removed Unity builds + matching stock ONNX policies:
|
| 28 |
+
[ccnets/causal-gpt-rl-unity-envs](https://huggingface.co/datasets/ccnets/causal-gpt-rl-unity-envs)
|
| 29 |
+
- Causal GPT-RL policy checkpoints (currently Crawler):
|
| 30 |
+
[ccnets/causal-gpt-rl-unity](https://huggingface.co/ccnets/causal-gpt-rl-unity)
|
| 31 |
+
|
| 32 |
+
## Contents
|
| 33 |
+
|
| 34 |
+
| Dataset id | Episodes | Transitions | Observation | Action |
|
| 35 |
+
|---|---:|---:|---|---|
|
| 36 |
+
| `unity/crawler/expert-v0` | 1,048 | 1,000,002 | `Tuple(Box(126), Box(32))` | `Box(20, [-1, 1])` |
|
| 37 |
+
| `unity/crawler/medium-v0` | 1,129 | 1,000,000 | `Tuple(Box(126), Box(32))` | `Box(20, [-1, 1])` |
|
| 38 |
+
| `unity/crawler/simple-v0` | 1,344 | 1,000,000 | `Tuple(Box(126), Box(32))` | `Box(20, [-1, 1])` |
|
| 39 |
+
| `unity/pushblock/expert-v0` | 52,801 | 1,000,000 | `Tuple(Box(105), Box(105))` | `Discrete(7)` |
|
| 40 |
+
| `unity/pushblock/medium-v0` | 2,450 | 1,000,000 | `Tuple(Box(105), Box(105))` | `Discrete(7)` |
|
| 41 |
+
| `unity/pushblock/simple-v0` | 1,783 | 1,000,000 | `Tuple(Box(105), Box(105))` | `Discrete(7)` |
|
| 42 |
+
| `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])` |
|
| 43 |
+
| `unity/soccer-twos/medium-v0` | 13,040 | 1,001,776 | ego `Dict` wrapping `Tuple(Box(264), Box(72))` | ego `Dict` wrapping `MultiDiscrete([3, 3, 3])` |
|
| 44 |
+
| `unity/soccer-twos/simple-v0` | 12,860 | 1,003,048 | ego `Dict` wrapping `Tuple(Box(264), Box(72))` | ego `Dict` wrapping `MultiDiscrete([3, 3, 3])` |
|
| 45 |
+
| `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)` |
|
| 46 |
+
| `unity/dungeon-escape/medium-v0` | 19,023 | 1,003,025 | ego `Dict` wrapping `Tuple(Box(10), Box(360), Box(1))` | ego `Dict` wrapping `Discrete(7)` |
|
| 47 |
+
| `unity/dungeon-escape/simple-v0` | 11,367 | 1,003,316 | ego `Dict` wrapping `Tuple(Box(10), Box(360), Box(1))` | ego `Dict` wrapping `Discrete(7)` |
|
| 48 |
+
| `unity/3dball-hard/expert-v0` | 1,009 | 1,000,008 | `Tuple(Box(27), Box(18))` | `Box(2)` |
|
| 49 |
+
| `unity/3dball-hard/medium-v0` | 1,250 | 1,000,008 | `Tuple(Box(27), Box(18))` | `Box(2)` |
|
| 50 |
+
| `unity/3dball-hard/simple-v0` | 1,655 | 1,000,008 | `Tuple(Box(27), Box(18))` | `Box(2)` |
|
| 51 |
+
| `unity/pyramids/expert-v0` | 5,348 | 1,000,000 | `Tuple(Box(56), Box(56), Box(56), Box(4))` | `Discrete(5)` |
|
| 52 |
+
| `unity/pyramids/medium-v0` | 1,858 | 1,000,000 | `Tuple(Box(56), Box(56), Box(56), Box(4))` | `Discrete(5)` |
|
| 53 |
+
| `unity/pyramids/simple-v0` | 1,399 | 1,000,000 | `Tuple(Box(56), Box(56), Box(56), Box(4))` | `Discrete(5)` |
|
| 54 |
+
| `unity/worm/expert-v0` | 1,000 | 1,000,000 | `Box(64)` | `Box(9, [-1, 1])` |
|
| 55 |
+
| `unity/worm/medium-v0` | 1,000 | 1,000,000 | `Box(64)` | `Box(9, [-1, 1])` |
|
| 56 |
+
| `unity/worm/simple-v0` | 1,000 | 1,000,000 | `Box(64)` | `Box(9, [-1, 1])` |
|
| 57 |
+
| `unity/walker/expert-v0` | 1,458 | 1,000,010 | `Box(243)` | `Box(39, [-1, 1])` |
|
| 58 |
+
| `unity/walker/medium-v0` | 1,712 | 1,000,000 | `Box(243)` | `Box(39, [-1, 1])` |
|
| 59 |
+
| `unity/walker/simple-v0` | 2,247 | 1,000,000 | `Box(243)` | `Box(39, [-1, 1])` |
|
| 60 |
+
|
| 61 |
+
All environments, datasets, and stock policies use **ML-Agents `release_23`**.
|
| 62 |
+
Each dataset is stored at `<name>/<tier>/data/main_data.hdf5` with a sibling
|
| 63 |
+
`metadata.json` (`minari_version` 0.5.3). SoccerTwos and DungeonEscape use an
|
| 64 |
+
ego-agent schema — `observations["agents"]["agent_0"]`,
|
| 65 |
+
`actions["agents"]["agent_0"]` — one ego episode per physical agent; split by
|
| 66 |
+
`match_id` (see [docs/reproduction.md](docs/reproduction.md)).
|
| 67 |
+
|
| 68 |
+
## Loading
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
from pathlib import Path
|
| 72 |
+
from huggingface_hub import snapshot_download
|
| 73 |
+
import minari
|
| 74 |
+
|
| 75 |
+
snapshot_download(
|
| 76 |
+
repo_id="ccnets/causal-gpt-rl-unity-datasets",
|
| 77 |
+
repo_type="dataset",
|
| 78 |
+
allow_patterns="worm/**", # one env; drop to fetch all
|
| 79 |
+
local_dir=Path.home() / ".minari" / "datasets" / "unity",
|
| 80 |
+
)
|
| 81 |
+
dataset = minari.load_dataset("unity/worm/expert-v0")
|
| 82 |
+
# calibrated tiers: minari.load_dataset("unity/worm/medium-v0" | ".../simple-v0")
|
| 83 |
+
print(dataset.observation_space, dataset.action_space)
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Quality ladders
|
| 87 |
+
|
| 88 |
+
Each ladder is a monotone skill sequence built from ONE stock policy: `expert` is
|
| 89 |
+
the unmodified policy, `medium`/`simple` inject progressively stronger action
|
| 90 |
+
noise. The noise level is sampled per episode from a calibrated range (continuous
|
| 91 |
+
scenes vary Gaussian `noise_std`; discrete scenes vary the resample probability
|
| 92 |
+
`epsilon`; cooperative scenes sample per group/team per match, seed 2310000), so
|
| 93 |
+
the tier mean hits its normalized target while episodes cover a continuous skill
|
| 94 |
+
band. Normalization is `(candidate − random) / (expert − random)` on each env's
|
| 95 |
+
tier metric.
|
| 96 |
+
|
| 97 |
+
| env | tier metric | medium | simple | noise method |
|
| 98 |
+
|---|---|---:|---:|---|
|
| 99 |
+
| `crawler` | episode return | 0.82 | 0.60 | per-episode `noise_std` range |
|
| 100 |
+
| `worm` | episode return | 0.80 | 0.60 | per-episode `noise_std` range |
|
| 101 |
+
| `walker` | episode return | 0.82 | 0.61 | per-episode `noise_std` range |
|
| 102 |
+
| `3dball-hard` | episode return | 0.80 | 0.60 | per-episode `noise_std` range |
|
| 103 |
+
| `pushblock` | episode return | 0.79 | 0.61 | per-episode `epsilon` range |
|
| 104 |
+
| `pyramids` | episode return | 0.80 | 0.58 | per-episode `epsilon` range |
|
| 105 |
+
| `dungeon-escape` | group success | 0.78 | 0.56 | per-group `epsilon` pool |
|
| 106 |
+
| `soccer-twos` | match score | ~0.80 | ~0.58 | per-team `epsilon` pool |
|
| 107 |
+
|
| 108 |
+
`soccer-twos` figures are approximate: self-play stays balanced, so tier skill
|
| 109 |
+
cannot be read off the shipped returns and comes from side-swapped calibration.
|
| 110 |
+
Sparse-reward scenes (pyramids, pushblock, dungeon, soccer) have a physically
|
| 111 |
+
bimodal per-episode outcome (solve vs. time-out); there the range spreads
|
| 112 |
+
*trajectory* competence rather than the return histogram. `simple` targets 0.60
|
| 113 |
+
but the shipped tiers span **0.56–0.61** (DungeonEscape 0.56 and SoccerTwos ~0.58
|
| 114 |
+
sit at the low edge, calibrated to the earlier ~0.50 band); `medium` spans
|
| 115 |
+
0.78–0.82.
|
| 116 |
+
|
| 117 |
+
"termination rate" below = fraction of episodes ending on the env's terminal
|
| 118 |
+
condition — a fall for Crawler/Walker/3DBallHard, a solved push for PushBlock,
|
| 119 |
+
maze solve ("reach") for Pyramids; Worm never terminates (truncated at 1000).
|
| 120 |
+
|
| 121 |
+
<details>
|
| 122 |
+
<summary><b>Per-environment ladder tables</b> — exact ranges, anchors, mean returns, rates</summary>
|
| 123 |
+
|
| 124 |
+
**Crawler** — anchors: expert 2576.4899, random −0.88
|
| 125 |
+
|
| 126 |
+
| tier | norm. return | noise_std range | mean return | term. rate | mean ep length |
|
| 127 |
+
|---|---:|---:|---:|---:|---:|
|
| 128 |
+
| `expert-v0` | 1.00 | -- | 2576.4899 | 0.077 | 954.20 |
|
| 129 |
+
| `medium-v0` | ~0.82 | 0.15–0.23 | 2113.0960 | 0.209 | 885.74 |
|
| 130 |
+
| `simple-v0` | ~0.60 | 0.21–0.32 | 1557.9818 | 0.460 | 744.05 |
|
| 131 |
+
|
| 132 |
+
**Worm** — anchors: expert 1044.1063, random 0.80 (never terminates)
|
| 133 |
+
|
| 134 |
+
| tier | norm. return | noise_std range | mean return | term. rate | mean ep length |
|
| 135 |
+
|---|---:|---:|---:|---:|---:|
|
| 136 |
+
| `expert-v0` | 1.00 | -- | 1044.1063 | 0.000 | 1000.00 |
|
| 137 |
+
| `medium-v0` | ~0.80 | 0.09–0.15 | 839.4910 | 0.000 | 1000.00 |
|
| 138 |
+
| `simple-v0` | ~0.60 | 0.15–0.22 | 632.4776 | 0.000 | 1000.00 |
|
| 139 |
+
|
| 140 |
+
**Walker** — anchors: expert 1363.6454, random −0.49 (high intrinsic return variance)
|
| 141 |
+
|
| 142 |
+
| tier | norm. return | noise_std range | mean return | term. rate | mean ep length |
|
| 143 |
+
|---|---:|---:|---:|---:|---:|
|
| 144 |
+
| `expert-v0` | 1.00 | -- | 1363.6454 | 0.512 | 685.88 |
|
| 145 |
+
| `medium-v0` | ~0.82 | 0.05–0.11 | 1122.0456 | 0.652 | 584.11 |
|
| 146 |
+
| `simple-v0` | ~0.61 | 0.09–0.15 | 835.2383 | 0.822 | 445.04 |
|
| 147 |
+
|
| 148 |
+
**3DBallHard** — anchors: expert 99.1077, random 0.84 (capped balance: near-bimodal)
|
| 149 |
+
|
| 150 |
+
| tier | norm. return | noise_std range | mean return | term. rate | mean ep length |
|
| 151 |
+
|---|---:|---:|---:|---:|---:|
|
| 152 |
+
| `expert-v0` | 1.00 | -- | 99.1077 | 0.001 | 991.09 |
|
| 153 |
+
| `medium-v0` | ~0.80 | 0.28–0.38 | 79.6258 | 0.341 | 800.01 |
|
| 154 |
+
| `simple-v0` | ~0.60 | 0.31–0.44 | 59.7502 | 0.612 | 604.23 |
|
| 155 |
+
|
| 156 |
+
**PushBlock** — anchors: expert 4.9721, random ~−0.16 (soft; the `epsilon` 1 baseline is noisy). Very noise-robust (flat until epsilon ~0.7, sharp fall over 0.80–0.92). term. rate = solved.
|
| 157 |
+
|
| 158 |
+
| tier | norm. return | epsilon range | mean return | term. rate | mean ep length |
|
| 159 |
+
|---|---:|---:|---:|---:|---:|
|
| 160 |
+
| `expert-v0` | 1.00 | -- | 4.972084 | ~1.00 | 18.94 |
|
| 161 |
+
| `medium-v0` | ~0.79 | 0.78–0.85 | 3.908600 | 0.863 | 408.16 |
|
| 162 |
+
| `simple-v0` | ~0.61 | 0.82–0.89 | 2.964500 | 0.705 | 560.85 |
|
| 163 |
+
|
| 164 |
+
**Pyramids** — anchors: expert 1.795309, random −1.0 (sparse: policy always times out at random). term. rate = mazes reached/solved.
|
| 165 |
+
|
| 166 |
+
| tier | norm. return | epsilon range | mean return | reach rate | mean ep length |
|
| 167 |
+
|---|---:|---:|---:|---:|---:|
|
| 168 |
+
| `expert-v0` | 1.00 | -- | 1.795309 | 0.9906 | 186.99 |
|
| 169 |
+
| `medium-v0` | ~0.80 | 0.50–0.66 | 1.228100 | 0.8827 | 538.21 |
|
| 170 |
+
| `simple-v0` | ~0.58 | 0.62–0.74 | 0.618400 | 0.6662 | 714.80 |
|
| 171 |
+
|
| 172 |
+
**DungeonEscape** — tier metric is **group success** `any(agent_return > 0)`; anchors: expert success 0.9532, random ~0.19. Group shares one pooled epsilon per episode; determine success at group level (`group_metadata.jsonl`).
|
| 173 |
+
|
| 174 |
+
| tier | group success | epsilon pool | mean ep length | approx. norm. skill |
|
| 175 |
+
|---|---:|---|---:|---:|
|
| 176 |
+
| `expert-v0` | 0.9532 | stock (no noise) | 28.04 | 1.00 |
|
| 177 |
+
| `medium-v0` | 0.7851 | {0.42, 0.44, 0.46, 0.48} | 52.73 | ~0.78 |
|
| 178 |
+
| `simple-v0` | 0.6247 | {0.60, 0.65, 0.70, 0.75} | 88.27 | ~0.56 |
|
| 179 |
+
|
| 180 |
+
**SoccerTwos** — tier metric is **side-swapped match score** vs the fixed stock policy (self-play, so mean shipped return ≈ −0.038 for both tiers and does not track skill; figures are calibration estimates). Each team samples one pooled epsilon per match.
|
| 181 |
+
|
| 182 |
+
| tier | approx. norm. skill | epsilon pool | matches | mean ep length |
|
| 183 |
+
|---|---:|---|---:|---:|
|
| 184 |
+
| `expert-v0` | 1.00 | stock (no noise) | 3,647 | 68.61 |
|
| 185 |
+
| `medium-v0` | ~0.80 | {0.08, 0.09, 0.10} | 3,260 | 76.82 |
|
| 186 |
+
| `simple-v0` | ~0.58 | {0.08, 0.10, 0.15} | 3,215 | 78.00 |
|
| 187 |
+
|
| 188 |
+
</details>
|
| 189 |
+
|
| 190 |
+
**Build & reproduction steps** (per-env recording recipe): see
|
| 191 |
+
[docs/reproduction.md](docs/reproduction.md).
|
| 192 |
+
|
| 193 |
+
## Provenance & attribution
|
| 194 |
+
|
| 195 |
+
- Trajectories were generated by running Unity ML-Agents material (the builds and
|
| 196 |
+
stock policies are Apache-2.0; see the envs repo for provenance and licenses).
|
| 197 |
+
- The **trajectory data in this repo** is an original recording licensed
|
| 198 |
+
**CC-BY-4.0**. Please attribute *ccnets — Causal GPT-RL* and note the Unity
|
| 199 |
+
ML-Agents source environment.
|
| 200 |
+
|
| 201 |
+
## License
|
| 202 |
+
|
| 203 |
+
Creative Commons Attribution 4.0 International (CC-BY-4.0). See `LICENSE`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/reproduction.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Reproduction recipe
|
| 2 |
+
|
| 3 |
+
How the datasets in [this repo](../README.md) were recorded from public
|
| 4 |
+
materials. Scripts live in the GitHub repo — record with
|
| 5 |
+
[`examples/unity_collection`](https://github.com/ccnets-team/causal-gpt-rl/tree/main/examples/unity_collection)
|
| 6 |
+
and package with
|
| 7 |
+
[`collection/build_minari.py`](https://github.com/ccnets-team/causal-gpt-rl/blob/main/collection/build_minari.py).
|
| 8 |
+
For each ONNX-driven environment, get the matching model-removed build and stock
|
| 9 |
+
policy from the
|
| 10 |
+
[envs repo](https://huggingface.co/datasets/ccnets/causal-gpt-rl-unity-envs),
|
| 11 |
+
record each agent's per-step `(observation, action, reward, termination)`, and
|
| 12 |
+
preserve the action/observation structure declared by that build.
|
| 13 |
+
|
| 14 |
+
## Format & provenance
|
| 15 |
+
|
| 16 |
+
All environments, datasets, and stock behavior policies use **ML-Agents
|
| 17 |
+
`release_23`**; machine-readable provenance is in `release_manifest.json`. Every
|
| 18 |
+
dataset is stored at `<name>/<tier>/data/main_data.hdf5` with a sibling
|
| 19 |
+
`metadata.json` (`minari_version` 0.5.3).
|
| 20 |
+
|
| 21 |
+
**Ego-agent schema (SoccerTwos, DungeonEscape).** These use
|
| 22 |
+
`observations["agents"]["agent_0"]` / `actions["agents"]["agent_0"]`. Each
|
| 23 |
+
physical agent is stored as one ego-centric episode because the Unity examples run
|
| 24 |
+
one shared decentralized policy independently per agent; the wrapper exposes the
|
| 25 |
+
multi-agent structure without granting the policy privileged access to teammates'
|
| 26 |
+
private observations. Reconstruct a match/group by grouping the linked episodes on
|
| 27 |
+
`match_id`; **split by `match_id`, never by individual ego episode.**
|
| 28 |
+
|
| 29 |
+
**Quality tiers.** `medium`/`simple` add action noise to the stock policy, sampled
|
| 30 |
+
per episode from a calibrated range (single-agent) or per group/team per match from
|
| 31 |
+
a pool (cooperative), seed 2310000. Exact ranges, anchors, and calibration notes
|
| 32 |
+
are in the [dataset card](../README.md)'s "Quality ladders" section.
|
| 33 |
+
|
| 34 |
+
## SoccerTwos
|
| 35 |
+
|
| 36 |
+
1. Build the release_23 SoccerTwos scene with both teams' model assets removed so
|
| 37 |
+
both behavior groups are controlled externally.
|
| 38 |
+
2. Run the stock `SoccerTwos.onnx` for both teams and record both sides. The
|
| 39 |
+
original ONNX declares two nonexistent Sentis metadata graph outputs; for ONNX
|
| 40 |
+
Runtime, remove only those dangling output declarations (the action graph is
|
| 41 |
+
unchanged).
|
| 42 |
+
3. Store the sum of per-agent `reward` and `group_reward` (goals arrive via
|
| 43 |
+
`group_reward`).
|
| 44 |
+
4. Preserve `Tuple(Box(264), Box(72))` observations and `MultiDiscrete([3, 3, 3])`
|
| 45 |
+
actions.
|
| 46 |
+
5. Link the four decentralized episodes per field with `match_id`; finish all
|
| 47 |
+
in-flight matches after crossing one million transitions.
|
| 48 |
+
|
| 49 |
+
Expert validation: 1,000,816 transitions, 14,588 terminated episodes, 3,647
|
| 50 |
+
matches, 0 truncations, every match has equal linked lengths with two wins / two
|
| 51 |
+
losses. Mean agent ep length 68.61, mean return −0.034302.
|
| 52 |
+
|
| 53 |
+
## DungeonEscape
|
| 54 |
+
|
| 55 |
+
1. Use the stock `DungeonEscape.onnx` shared POCA policy with the model removed so
|
| 56 |
+
each agent is driven externally.
|
| 57 |
+
2. Record each physical agent independently; preserve its three local sensor leaves
|
| 58 |
+
(rigid-body 10, stacked ray 360, has-key flag 1) and single `Discrete(7)` action.
|
| 59 |
+
3. Relabel each physical agent as ego path `agents.agent_0`. Three episodes sharing
|
| 60 |
+
one `match_id` reconstruct the cooperative group (distinct local trajectories,
|
| 61 |
+
not copies).
|
| 62 |
+
4. Sum `reward` and `group_reward`. Determine success only at group level — an
|
| 63 |
+
agent that dies early may not receive a later positive group reward.
|
| 64 |
+
5. Split by `match_id`.
|
| 65 |
+
|
| 66 |
+
Expert validation: 1,003,523 transitions, 35,787 ego episodes, 11,929 groups
|
| 67 |
+
(11,371 successes / 558 failures), 0 shape/range errors. Every match links exactly
|
| 68 |
+
three episodes.
|
| 69 |
+
|
| 70 |
+
## PushBlock
|
| 71 |
+
|
| 72 |
+
1. Use the model-removed PushBlock build and drive all 32 agents with the stock
|
| 73 |
+
`PushBlock.onnx`. This is the original discrete PushBlock, not the hybrid
|
| 74 |
+
PushBlockWithInput.
|
| 75 |
+
2. Preserve the two `105`-d sensors and the single `Discrete(7)` action branch.
|
| 76 |
+
3. Stop at one million transitions and package each physical-agent episode
|
| 77 |
+
independently.
|
| 78 |
+
|
| 79 |
+
Expert validation: 52,801 episodes (52,702 terminated / 99 truncated at the
|
| 80 |
+
recording boundary), mean return 4.972084, mean ep length 18.94.
|
| 81 |
+
|
| 82 |
+
## Pyramids, Worm, Walker, 3DBallHard
|
| 83 |
+
|
| 84 |
+
Use each model-removed build with its matching stock ONNX; record each physical
|
| 85 |
+
scene agent independently and stop at one million transitions. Schemas come
|
| 86 |
+
directly from the live ML-Agents behavior specs.
|
| 87 |
+
|
| 88 |
+
- **Pyramids** — 5,348 episodes, 1,000,000 transitions, mean return 1.795309, mean
|
| 89 |
+
length 186.99 (5,298 terminated / 50 truncated). `Tuple(Box(56)×3, Box(4))`,
|
| 90 |
+
`Discrete(5)`.
|
| 91 |
+
- **Worm** — 1,000 episodes, 1,000,000 transitions, mean return 1044.106317, mean
|
| 92 |
+
length 1000.00 (0 terminated / 1,000 truncated). `Box(64)`, `Box(9)`.
|
| 93 |
+
- **Walker** — 1,458 episodes, 1,000,010 transitions, mean return 1363.645402, mean
|
| 94 |
+
length 685.88 (747 terminated / 711 truncated). `Box(243)`, `Box(39)`.
|
| 95 |
+
- **3DBallHard** — 1,009 episodes, 1,000,008 transitions, mean return 99.107732,
|
| 96 |
+
mean length 991.09 (1 terminated / 1,008 truncated). `Tuple(Box(27), Box(18))`,
|
| 97 |
+
`Box(2)`.
|
| 98 |
+
|
| 99 |
+
The recipe ends at the Minari dataset — a portable, env-less trajectory set.
|