PufferDrive
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
.inisettings 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
Install & Build
Set up the environment, install dependencies, and compile the native extensions.
Open guidePrepare Data
Download WOMD/Carla data from Hugging Face and convert to map binaries.
Open guideTrain & Evaluate
Train agents and evaluate them with WOSAC and human-replay benchmarks.
Open guideRepository 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.