Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AutoWorldModel-Bench

Paper Project Page Dataset

A closed-loop benchmark framework for evaluating frontier coding agents on open-ended world-model research. Agents autonomously improve starter models under a fixed compute budget across 8 game environments β€” measuring research capability rather than engineering-to-spec task completion.

πŸ“„ Paper: AutoWorldModel-Bench: A State-Centric Benchmark for Automated World-Model Research

Starter Models

Model Type Architecture
Dreamer Continuous, recurrent DreamerV3-style RSSM with discrete categorical latent (32x32)
AR-Transformer Continuous, attention Autoregressive Transformer with temporal context encoder
D3PM Discrete, diffusion Discrete denoising diffusion with temporal cross-attention
MaskGIT Discrete, masked Masked generative Transformer with iterative parallel decoding

Games

Game Max Entities Gameplay Fields
asteroids 20 age, hp, size_class
breakout 52 col, hp, row
frogger 28 lane_type, reached
kong 16 β€”
platformer 24 on_ground
pong 5 β€”
racer 6 β€”
snake 48 direction, segment_index

Quick Start

# Install (requires uv: https://docs.astral.sh/uv/)
uv sync

# Prepare data (downloads from HuggingFace Hub)
python scripts/prepare_data.py --game pong

# Run a single task (train + evaluate)
cd tasks/pong_dreamer
python run.py --config config_template.json

Note: config_template.json uses container paths (/data/...). For local runs, create a config with "cache_dir": "../../data/pong/_cache" or set up a symlink.

Dataset

Data is hosted on HuggingFace: AutoWorldModel/AutoWorldModelBench

prepare_data.py automatically downloads and caches parquet files. Each game contains:

  • train.parquet β€” 10,000 training episodes
  • val.parquet β€” 3,000 validation episodes
  • test.parquet β€” 3,000 test episodes
  • scenario.parquet β€” 3,000 scenario-based test episodes
  • meta.json β€” game metadata (max_entities, dimensions)

Repository Structure

β”œβ”€β”€ lib/                    # Shared infrastructure
β”‚   β”œβ”€β”€ trainer.py          # Training loop (step-based, AMP, early stopping)
β”‚   β”œβ”€β”€ loader.py           # Parquet loading + windowed tensor construction
β”‚   β”œβ”€β”€ evaluator.py        # UnifiedEvaluator (position L1, alive F1, composite)
β”‚   β”œβ”€β”€ temporal.py         # TemporalContextEncoder, CrossAttentionBlock
β”‚   β”œβ”€β”€ tokenizer.py        # EntityTokenizer for discrete models
β”‚   β”œβ”€β”€ task_utils.py       # Experiment tracking utilities
β”‚   └── config.py           # Per-game quantization configs
β”‚
β”œβ”€β”€ templates/              # Source-of-truth model implementations
β”‚   β”œβ”€β”€ dreamer.py
β”‚   β”œβ”€β”€ ar_transformer.py
β”‚   β”œβ”€β”€ d3pm.py
β”‚   └── maskgit.py
β”‚
β”œβ”€β”€ tasks/                  # 32 task directories (8 games x 4 models)
β”‚   └── {game}_{model}/
β”‚       β”œβ”€β”€ train.py        # Model training (copied from templates/)
β”‚       β”œβ”€β”€ run.py          # Experiment-tracking wrapper
β”‚       β”œβ”€β”€ score.py        # Standalone evaluation
β”‚       β”œβ”€β”€ config_template.json  # Default hyperparameters
β”‚       β”œβ”€β”€ instruction.md  # Agent instructions
β”‚       β”œβ”€β”€ task.toml       # Harbor task metadata
β”‚       β”œβ”€β”€ environment/    # Dockerfile + docker-compose for Harbor
β”‚       └── tests/test.sh   # Verifier script
β”‚
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ orchestrate.py      # GPU-parallel Harbor orchestrator
β”‚   β”œβ”€β”€ prepare_data.py     # Download + cache data from HuggingFace
β”‚   β”œβ”€β”€ setup_tasks.py      # (Re)generate task directories
β”‚   β”œβ”€β”€ refresh.py          # Sync templates to task directories
β”‚   └── preflight.py        # Environment validation
β”‚
β”œβ”€β”€ docker/                 # Docker images for Harbor
β”‚   β”œβ”€β”€ Dockerfile.harbor   # Base image (PyTorch, Claude Code, Codex)
β”‚   └── Dockerfile.base     # Minimal base image
β”‚
β”œβ”€β”€ agents/                 # Agent configurations
β”‚   β”œβ”€β”€ claude-code.json    # Claude Code agent config
β”‚   └── codex.toml          # Codex agent config
β”‚
β”œβ”€β”€ run_harbor.sh           # Single-task Harbor runner
└── agent.py                # LLM-driven hyperparameter optimization agent

Evaluation Metrics

Models are evaluated on multi-step open-loop rollouts at horizons {1, 10, 20}:

  • Position L1: Mean absolute error on entity (x, y) positions (lower is better)
  • Alive F1: F1 score on entity alive/dead classification
  • Composite: Weighted combination 0.9 * (1 - pos_l1) + 0.1 * alive_f1 (higher is better)

Harbor (Agent Benchmarking)

To run tasks with an AI coding agent via Harbor:

# Single task
./run_harbor.sh --task pong_dreamer --agent claude-code

# All models for a game
./run_harbor.sh --game pong --agent claude-code

# All 32 tasks with GPU-parallel orchestration
python scripts/orchestrate.py --all --agent claude-code --gpus 0,1,2,3

Supported agents: claude-code, codex

See docs/SETUP.md for Docker setup and agent authentication.

Editing Models

Edit the template, then sync to task directories:

vim templates/dreamer.py
python scripts/refresh.py --model dreamer   # updates 8 task dirs
python scripts/refresh.py --all             # updates all 32 dirs

Data Format

Each episode is stored as a row in parquet with binary tensor columns:

  • registry: [N, 34] β€” static entity attributes (type, archetype, slot)
  • states: [T, N, 23] β€” dynamic entity state (position, velocity, gameplay fields)
  • actions: [T, 7] β€” per-frame player actions
  • globals: [T, 17] β€” global game state features
  • mutable_mask: [N] β€” which entities to predict
  • gameplay_mask: [N, 14] β€” per-entity active gameplay fields

Where T = episode length, N = max entities for the game.

Contributing

Before you can contribute, EA must have a Contributor License Agreement (CLA) on file that has been signed by each contributor. You can sign here.

Citation

If you use AutoWorldModel-Bench in your research, please cite our paper:

@article{autoworldmodelbench,
  title   = {AutoWorldModel-Bench: A State-Centric Benchmark for Automated World-Model Research},
  journal = {arXiv preprint arXiv:2608.11216},
  year    = {2026},
  url     = {https://arxiv.org/abs/2608.11216}
}

About

Evaluates AI coding agents as autonomous researchers that improve state-centric world models under fixed compute budgets

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages