NeuralCraft World Model Data
Action-conditioned Minecraft gameplay for training an interactive world model. 5,548,016 frames in 126,085 contiguous runs across 303 shards.
Derived from TESS-Computer/minecraft-vla-stage1 (OpenAI VPT contractor data), curated to gameplay only.
- Frames: 256x144 RGB JPEG, 5 Hz (VPT native rate).
- Run length: min 16, median 29, max 1055 frames. All runs >= 16.
metadata.jsonl: one line per run —{run, shard, n_frames, speed_mean}.
Usable windows by sequence length: seq 16 -> 100% of frames, seq 24 -> 85%, seq 32 -> 73%.
Why tar files (and why the dataset viewer is off)
The .tar files are not a WebDataset. Each tar holds ordered directories, one per contiguous
gameplay run:
<run>/frames/frame_000000.jpg
<run>/frames/frame_000001.jpg
...
<run>/actions.jsonl # one JSON line per frame, same order as the frames
Three reasons for this layout:
- A world model trains on contiguous sequences, not independent samples. The unit of training
is a window of N consecutive frames plus the actions taken across them. WebDataset's flat
key.jpg/key.jsonpairing has no way to express "these frames are consecutive and ordered", and the viewer would shuffle them — which is meaningless for video. - File count. Stored as loose files this would be millions of objects in one repo, which makes listing, cloning and LFS painful. Tars keep it to a few hundred objects.
- Sequential reads. Training reads neighbouring frames together; a tar keeps them adjacent rather than scattered across a bucket.
Because the layout is deliberately not WebDataset, HF's auto-detection cannot parse it and the
dataset viewer is disabled (viewer: false). Load the tars directly with the snippets below.
Loading
import json, tarfile, glob, os
from huggingface_hub import hf_hub_download
REPO = "codelion/neuralcraft-world-data"
# the index: one line per run -> pick what you want without downloading everything
meta = [json.loads(l) for l in
open(hf_hub_download(REPO, "metadata.jsonl", repo_type="dataset")) if l.strip()]
print(len(meta), "runs")
# fetch and unpack one tar
tar = hf_hub_download(REPO, meta[0]["path"] if "path" in meta[0]
else f"data/{meta[0]['shard']}.tar", repo_type="dataset")
with tarfile.open(tar) as tf:
tf.extractall("work")
Each tar unpacks to MANY run directories (s00123_r0007/, ...) — iterate them.
Building training sequences
Frames and action records are index-aligned, so a training window is just a slice:
import numpy as np
from PIL import Image
def load_run(run_dir):
frames = sorted(glob.glob(os.path.join(run_dir, "frames", "*.jpg")))
recs = [json.loads(l) for l in open(os.path.join(run_dir, "actions.jsonl")) if l.strip()]
n = min(len(frames), len(recs)) # always slice to the shorter of the two
actions = np.array([r["actions"] for r in recs[:n]], np.float32) # [n, 13]
return frames[:n], actions
def windows(frames, actions, seq_len=16, stride=8):
"""contiguous (frames, actions) windows — the unit a world model trains on"""
for s in range(0, len(frames) - seq_len + 1, stride):
imgs = np.stack([np.asarray(Image.open(f).convert("RGB"), np.float32) / 255.0
for f in frames[s:s + seq_len]]) # [seq,H,W,3]
yield imgs, actions[s:s + seq_len] # [seq,13]
# a shard holds many runs
for run in sorted(os.listdir("work")):
frames, actions = load_run(os.path.join("work", run))
for imgs, acts in windows(frames, actions, seq_len=16):
... # train
Actions (13-dim)
| idx | field | type | notes |
|---|---|---|---|
| 0-8 | W, S, A, D, jump, sneak, sprint, attack, use |
binary | key presses |
| 9-10 | cam_dx, cam_dy |
float [-1,1] | mouse delta (VPT ground truth), signed-sqrt scaled |
| 11 | speed |
float [-1,1] | measured forward expansion, negative when moving backwards |
| 12 | turn_rate |
float [-1,1] | measured horizontal flow |
Indices 0-10 are the player's intent; 11-12 measure what the world actually did.
Normalisation: speed /= 1.266, turn_rate /= 1.559 (p95 of |value|), then clipped.
Caveat on speed: the Minecraft camera rotates independently of travel direction (mouse look),
so radial expansion mixes translation with head-turning. It is a useful signal but not pure walking
speed — cam_dx/dy are stored separately so a model can disentangle the two.
Curation
- Near-black frames dropped (brightness < 32) — unlit caves/night carry little learnable signal.
- GUI/menu removal with a CLIP content classifier (P(gameplay) < 0.20): inventory, crafting, chest, trading and pause screens, plus non-game content in the source screen recordings. A colour-based detector was tried first and failed — Minecraft's stone textures share the GUI greys, so the filter has to be semantic.
- Re-segmented into contiguous runs of >= 16 frames after filtering, because filtering creates gaps and a world model needs unbroken windows.
- Ego-motion measured per frame with optical flow and appended to the action vector.
15.1M source frames -> 5,548,016 curated (~63% removed).
- Downloads last month
- 49