Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PufferDrive

GitHub stars GitHub forks GitHub watchers

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.

Note

We just released PufferDrive 2.0! Check out the release post.

Try it in your browser

Hold Left Shift and use arrow keys or WASD to control the vehicle. Hold space for first-person view and ctrl to see what your agent is seeing :)

Highlights

  • Data-driven, multi-agent drive environment that trains agents at 300K steps per second.
  • Integrated benchmarks for distributional realism and human compatibility.
  • Raylib-based rendering 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/Carla data 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.