File size: 3,985 Bytes
f9154d2 24410cf 75304e5 7e2cf7c f9154d2 24410cf 7e2cf7c 24410cf 7e2cf7c 24410cf 7e2cf7c 24410cf 75304e5 7e2cf7c 24410cf 75304e5 24410cf 7e2cf7c 24410cf 75304e5 24410cf 75304e5 24410cf 75304e5 24410cf 7e2cf7c f91fc80 75304e5 6552dad 75304e5 6552dad 75304e5 6552dad 75304e5 6552dad 7e2cf7c 6552dad 75304e5 623b7d6 75304e5 6552dad 75304e5 6552dad 75304e5 6552dad 7e2cf7c 6552dad 75304e5 6552dad 75304e5 06e7eb5 75304e5 06e7eb5 75304e5 06e7eb5 75304e5 06e7eb5 75304e5 06e7eb5 7e2cf7c 75304e5 24410cf 75304e5 24410cf 75304e5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 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 | ---
license: other
license_name: polyform-noncommercial-1.0.0
license_link: https://polyformproject.org/licenses/noncommercial/1.0.0
tags:
- reinforcement-learning
- unity-ml-agents
- onnx
- causal-gpt-rl
- pyramids
- pushblock
---
# Causal GPT-RL — Unity ML-Agents Policies
Causal GPT-RL policies trained for Unity ML-Agents environments.
This repository contains self-contained ONNX policies:
```text
pyramids/pyramids-b16.onnx
pushblock/pushblock-b32.onnx
```
The graph includes observation normalization and can run with ONNX Runtime or
Unity Sentis without PyTorch at inference time.
## Pyramids
### Training data
This policy was trained using:
- `unity/pyramids/simple-v0`
- `unity/pyramids/medium-v0`
The `unity/pyramids/expert-v0` dataset was not used for training and is included
below only as an evaluation reference.
### Evaluation
| Policy | Context | Batch | Observation | Action | Return | Completed |
|---|---:|---:|---:|---|---:|---:|
| `pyramids/pyramids-b16.onnx` | 32 | 16 | 172 | `Discrete(5)` | **1.7738 ± 0.1278** | **128/128** |
The result is the mean ± population standard deviation over 128 episodes:
16 agents across eight fresh Unity launches using environment seeds `100..107`.
All episodes completed successfully on the matching model-removed ML-Agents
release-23 Pyramids build.
### Dataset reference
| Dataset | Episodes | Mean return | Training use |
|---|---:|---:|---|
| `unity/pyramids/simple-v0` | 3,042 | 1.6256 ± 0.4154 | Used |
| `unity/pyramids/medium-v0` | 4,159 | 1.7432 ± 0.2601 | Used |
| `unity/pyramids/expert-v0` | 5,348 | 1.7953 ± 0.2661 | Not used |
The ONNX policy exceeds the mean returns of both training datasets. It is also
approximately 1.2% below the expert dataset mean, despite never being trained
on the expert dataset.
Dataset returns are sums of the recorded per-step rewards for each Minari
episode.
### ONNX interface
| Input/output | Shape |
|---|---|
| `states` | `[16, 32, 172]` |
| `actions` | `[16, 32, 5]` |
| `is_bos` | `[16, 32, 1]` |
| `mask` | `[16, 32]` |
| `action` | `[16, 5]` |
The four observation sensors must be concatenated in this order:
```text
56 + 56 + 56 + 4
```
`action` contains five logits. Select the environment action with `argmax`, then
feed its five-way one-hot representation into the next action window. Maintain
one independent 32-step rolling context per agent.
The graph uses the checkpoint's `bos_cache_mode=discard` serving convention.
## PushBlock
| Policy | Ctx | Obs | Action | Batch | Validation |
|---|---:|---:|---|---:|---:|
| `pushblock/pushblock-b32.onnx` | 32 | 210 (`105+105`) | `Discrete(7)` | 32 | 159/160 successes (99.4%) |
The graph inputs are `states[32,32,210]`, `actions[32,32,7]`,
`is_bos[32,32,1]`, and `mask[32,32]`; output `action[32,7]` contains the
seven discrete-action logits. Use `argmax` per row, and feed the selected
action back as a 7-way one-hot vector. The Unity scene has 32 agents and a
decision period of 5: infer only on decision steps and repeat the selected
action on the four intervening physics ticks.
Closed-loop validation covered five Unity seeds (160 first episodes): 159
successes (99.4%). A final ONNX-only run completed 32/32 episodes with return
`4.968 ± 0.049`.
This policy was trained on **expert-only trajectories**. Data affected by the
dataset recall was excluded and was not used to train this release.
## Companion resources
- [Unity environment build](https://huggingface.co/datasets/ccnets/causal-gpt-rl-unity-envs)
- [Recorded datasets](https://huggingface.co/datasets/ccnets/causal-gpt-rl-unity-datasets)
- [Evaluation code](https://github.com/ccnets-team/causal-gpt-rl/tree/main/examples/unity)
- [Causal GPT-RL models for Gymnasium and MuJoCo](https://huggingface.co/ccnets/causal-gpt-rl)
## License
Released under PolyForm Noncommercial License 1.0.0. See `LICENSE` for details.
For commercial licensing, contact the maintainers via
[ccnets.org](https://ccnets.org).
|