pufferlib

Vectorize reinforcement learning environments and training loops with PyTorch.

94|11|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/swaruplab/operon --skill pufferlib-swaruplab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pufferlib
Source: https://github.com/swaruplab/operon/tree/main/src-tauri/protocols/pufferlib
Command: npx skills add https://github.com/swaruplab/operon --skill pufferlib-swaruplab

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

PufferLib delivers a high-performance reinforcement learning framework that accelerates experiments by providing native vectorized environments, ultra-fast training loops, and robust support for single-agent and multi-agent setups.

Core Features & Use Cases

  • High-throughput environment vectorization and parallelization for millions of steps per second.
  • Native multi-agent support and seamless integration with Gymnasium, PettingZoo, and Ocean/Procgen ecosystems.
  • Flexible policy architectures in PyTorch, with LSTM and advanced optimizations for speed and stability.
  • Practical templates and references for rapid task development, experimentation, and deployment.

Quick Start

Install and run the training pipeline with the provided templates to start a first experiment.

Frequently Asked Questions about pufferlib

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

FAQPage Schema
How do I scale multi-agent reinforcement learning environments for high-throughput training?

Reinforcement learning environments scale for high-throughput training using PufferLib's vectorized engine, which parallelizes workflows to process millions of steps per second across Gymnasium and PettingZoo ecosystems.

Can I use PyTorch to build custom policies for Gymnasium environments?

Yes, you can use PyTorch to build custom policies for Gymnasium environments, leveraging LSTM architectures and advanced optimizations for speed and stability during reinforcement learning training loops.

What is the best way to vectorize PettingZoo environments for parallel execution?

The best way to vectorize PettingZoo environments for parallel execution is using PufferLib's native vectorization engine, which provides high-throughput parallelization and seamless integration for multi-agent setups.

Does PufferLib require both PyTorch and NumPy dependencies to run?

Yes, PufferLib requires both PyTorch and NumPy dependencies to run, utilizing PyTorch for flexible policy architectures and NumPy for high-performance vectorized environment operations.

How do I start a reinforcement learning experiment using vectorized environments?

You start a reinforcement learning experiment using vectorized environments by installing PufferLib and running the provided training pipeline templates, which enable rapid task development and deployment for multi-agent workflows.