Skip to content

PufferDrive

PufferDrive logo

PufferDrive is a high-throughput autonomous driving simulator built on PufferLib. Train and evaluate multi-agent driving policies with fast vectorized stepping, streamlined data conversion, and ready-made benchmarks.

Highlights

  • Multi-agent drive environment that trains agents at 300K steps per second.
  • Scripts to convert Waymo Open Motion Dataset JSON into lightweight binaries (CARLA sample map included).
  • Benchmarks for distributional realism and human compatibility.
  • Raylib-based visualizer for local or headless render/export.

Quick start

  • Follow Getting Started to install, build the C extensions, and run puffer train puffer_drive.
  • Consult Simulator for how actions/observations, rewards, and .ini settings map to the underlying C environment and Torch policy.
  • Prepare drive map binaries with the steps in Data.
  • Evaluate a policy with the commands in Evaluation and preview runs with the Visualizer.

Workflow

Step 1

Install & Build

Set up the environment, install dependencies, and compile the native extensions.

Open guide
Step 2

Prepare Data

Download WOMD/GPUDrive datasets from Hugging Face and convert to map binaries.

Open guide
Step 3

Train & Evaluate

Train agents and evaluate them with WOSAC and human-replay benchmarks.

Open guide

Repository layout

  • pufferlib/ocean/drive: Drive environment implementation and map processing utilities.
  • resources/drive/binaries: Expected location for compiled map binaries (outputs of the data conversion step).
  • scripts/build_ocean.sh: Helper for building the Raylib visualizer and related binaries.
  • examples, tests, experiments: Reference usage, checks, and research scripts that pair with the docs pages.