pufferlib

Train reinforcement learning agents with vectorized environments across Gymnasium, PettingZoo, and Ocean.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/SciMate-AI/scicli --skill pufferlib-scimate-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pufferlib
Source: https://github.com/SciMate-AI/scicli/tree/main/internal/skills/bundled/claude-scientific-skills/skills/pufferlib
Command: npx skills add https://github.com/SciMate-AI/scicli --skill pufferlib-scimate-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, pufferlib, numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Accelerates reinforcement learning development by providing a high-performance, vectorized training framework that streamlines environment management and policy optimization.

Core Features & Use Cases

  • High-throughput PuffeRL-based training with vectorized environments for single-agent and multi-agent tasks.
  • Seamless integration with Gymnasium, PettingZoo, and Ocean environments to prototype, scale, and compare agents.
  • Flexible policy architectures (MLP, CNN, LSTM, and multi-input) with built-in initialization patterns and debugging utilities.

Quick Start

Run the provided train_template.py to bootstrap a PuffeRL experiment against an Ocean or Gymnasium environment.

Frequently Asked Questions about pufferlib

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I accelerate reinforcement learning training with vectorized environments?

Vectorized environments accelerate reinforcement learning training by parallelizing environment execution. This toolkit provides a high-performance framework supporting single-agent and multi-agent workflows across Gymnasium, PettingZoo, and Ocean ecosystems for rapid experimentation.

Can I use torchrun for multi-GPU reinforcement learning training?

Multi-GPU reinforcement learning training with torchrun is supported by this framework. It requires PyTorch and the PufferLib package to scale high-throughput PuffeRL-based training across multiple GPUs for single-agent and multi-agent tasks.

What policy architectures are supported for multi-agent reinforcement learning?

Multi-agent reinforcement learning supports flexible policy architectures including MLP, CNN, LSTM, and multi-input networks. The framework provides built-in initialization patterns and debugging utilities for training agents across PettingZoo and Ocean environments.

How do I bootstrap a reinforcement learning experiment with Gymnasium?

Bootstrapping a reinforcement learning experiment with Gymnasium uses the provided train_template.py script. This template initializes a PuffeRL experiment against an Ocean or Gymnasium environment to rapidly prototype and compare agents.

Does PufferLib work with PettingZoo environments for multi-agent training?

PufferLib works seamlessly with PettingZoo environments for multi-agent training. It integrates with the PettingZoo ecosystem to prototype, scale, and compare agents using vectorized environments and high-throughput training.

What's the best way to scale single-agent reinforcement learning for benchmarking?

Scaling single-agent reinforcement learning for benchmarking is best handled through high-throughput vectorized training. This framework streamlines environment management and policy optimization to rapidly experiment and compare agents across Gymnasium and Ocean.