Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- reinforcement-learning
|
| 5 |
+
- video-classification
|
| 6 |
+
tags:
|
| 7 |
+
- world-models
|
| 8 |
+
- pixel-art
|
| 9 |
+
- synthetic
|
| 10 |
+
- action-conditioned
|
| 11 |
+
size_categories:
|
| 12 |
+
- 1M<n<10M
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Small Worlds: a generated pixel-platformer corpus
|
| 16 |
+
|
| 17 |
+
**2,025,385 frames** of a single controllable agent in a deterministic 2D
|
| 18 |
+
platformer, with per-frame actions, rewards, episode boundaries and task labels.
|
| 19 |
+
Nothing here was scraped: every frame was rendered by a simulator written for the
|
| 20 |
+
purpose, which makes the coverage structure a *controlled variable*.
|
| 21 |
+
|
| 22 |
+
Built for research on world models and on hallucination in generative dynamics
|
| 23 |
+
models. Accompanying report: *Small Worlds: Subject-Scale Failure in
|
| 24 |
+
Reconstruction-Trained World-Model Tokenizers*.
|
| 25 |
+
|
| 26 |
+
## Why this corpus exists
|
| 27 |
+
|
| 28 |
+
Two properties are hard to obtain from recorded gameplay and are exact here:
|
| 29 |
+
|
| 30 |
+
1. **A known finite palette.** The renderer emits exactly **21 colours**, so
|
| 31 |
+
reconstruction can be scored as exact per-pixel agreement and *restricted to
|
| 32 |
+
any semantic subset* — the agent's own colours, for instance. This is what
|
| 33 |
+
makes the paper's central measurement possible.
|
| 34 |
+
2. **Coverage as a dial.** Each episode targets one coin drawn from a skewed
|
| 35 |
+
distribution and ends when it is collected, so a goal is a *task* and the
|
| 36 |
+
uppermost platform is visited in ~3% of episodes by construction.
|
| 37 |
+
|
| 38 |
+
The agent occupies a measured **1.30%** of frame pixels.
|
| 39 |
+
|
| 40 |
+
## Splits
|
| 41 |
+
|
| 42 |
+
| split | episodes | frames | size | purpose |
|
| 43 |
+
|---|---|---|---|---|
|
| 44 |
+
| `train` | 35,000 | 2,025,385 | 0.75 GB | training |
|
| 45 |
+
| `val` | 2,400 | 136,620 | 0.05 GB | evaluation |
|
| 46 |
+
| `test` | 2,400 | 139,157 | 0.05 GB | held out entirely |
|
| 47 |
+
| `probe_ledge` | 2,400 | 364,684 | 0.13 GB | 100% low-coverage region |
|
| 48 |
+
|
| 49 |
+
Seed blocks are widely separated and verified disjoint.
|
| 50 |
+
|
| 51 |
+
## Format
|
| 52 |
+
|
| 53 |
+
One `.npz` per shard, with a `.json` of per-shard statistics beside it.
|
| 54 |
+
|
| 55 |
+
| field | shape | dtype | notes |
|
| 56 |
+
|---|---|---|---|
|
| 57 |
+
| `frames` | (N, 128, 128, 3) | uint8 | native resolution, no resampling |
|
| 58 |
+
| `actions` | (N,) | uint8 | 0–5; 255 marks a terminal step |
|
| 59 |
+
| `action_vecs` | (N, 16) | float32 | zero-padded continuous encoding |
|
| 60 |
+
| `action_mask` | (16,) | float32 | 3 valid dimensions |
|
| 61 |
+
| `rewards` | (N,) | float32 | coin +1, crate +2, door +5 |
|
| 62 |
+
| `ep_id` | (N,) | int32 | episode boundaries |
|
| 63 |
+
| `goal` | (N,) | uint8 | task label; enables per-task resampling |
|
| 64 |
+
| `terminal` | (N,) | bool | |
|
| 65 |
+
|
| 66 |
+
Frames are stored once per episode; `frames[i+1]` is the successor within an
|
| 67 |
+
episode and `ep_id` marks boundaries. Flat pixel art deflates well — **368
|
| 68 |
+
bytes/frame** against 49,152 raw.
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
import numpy as np
|
| 72 |
+
from huggingface_hub import hf_hub_download
|
| 73 |
+
|
| 74 |
+
p = hf_hub_download("maxmill/small-worlds-pixel-platformer", "train/shard_0000.npz", repo_type="dataset")
|
| 75 |
+
d = np.load(p)
|
| 76 |
+
frames, actions, rewards = d["frames"], d["action_vecs"], d["rewards"]
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
## Coverage structure
|
| 80 |
+
|
| 81 |
+
Episode share and frame share are deliberately mismatched, reproducing the
|
| 82 |
+
heavy-tailed structure of larger corpora:
|
| 83 |
+
|
| 84 |
+
| task | episode share | frame share | ratio |
|
| 85 |
+
|---|---|---|---|
|
| 86 |
+
| ground | 31.9% | 5.3% | 0.17 |
|
| 87 |
+
| P1 | 31.1% | 37.5% | 1.21 |
|
| 88 |
+
| P2 | 31.0% | 41.6% | 1.34 |
|
| 89 |
+
| **P3 (rare)** | **6.0%** | 15.5% | 2.57 |
|
| 90 |
+
|
| 91 |
+
## Behaviour policies
|
| 92 |
+
|
| 93 |
+
| policy | share |
|
| 94 |
+
|---|---|
|
| 95 |
+
| scripted (routes over a physics-derived hop graph) | 40% |
|
| 96 |
+
| scripted + 20% random | 25% |
|
| 97 |
+
| scripted + 50% random | 15% |
|
| 98 |
+
| uniform random | 15% |
|
| 99 |
+
| explorer (biased to the rare platform) | 5% |
|
| 100 |
+
|
| 101 |
+
## Measured properties
|
| 102 |
+
|
| 103 |
+
- **Redundancy**: 25.4% of frames unique (mean 3.94 repeats) → ~515k distinct frames
|
| 104 |
+
- **Intrinsic dimensionality**: a frame is a deterministic function of ~26 bits of state
|
| 105 |
+
- **Palette**: exactly 21 colours; 9 belong to the agent
|
| 106 |
+
- **Versioning**: every shard carries `action_space_version` and `art_version`
|
| 107 |
+
|
| 108 |
+
## Licence
|
| 109 |
+
|
| 110 |
+
MIT.
|