C++17 physics library with Python bindings for kinematics, dynamics and contact simulation of articulated robots and animated characters.
sail-sg/envpool
A C++ batched environment pool for reinforcement learning that runs many Gym-style environments in parallel with a thread pool.
- Stars
- 1,533
- Forks
- 147
- Open issues
- 16
- Last commit
- 16 days ago
What is it?
EnvPool is a parallel execution engine for reinforcement learning environments. It manages a pool of environments in C++ with a thread pool and exposes them to Python through pybind11, so one call can step many environments at once. It supports both Gymnasium and dm_env style APIs, in synchronous and asynchronous modes, with batched interaction by default.
The project covers a wide range of environment families, including Atari, MuJoCo, DeepMind Control Suite, Box2D, ViZDoom, Procgen, Minigrid, MPE2, MetaWorld, PGX and Jumanji. Environments can also be added through a C++ developer interface. Rendering to batched RGB arrays and XLA support with JAX jit are available. Prebuilt wheels are published on PyPI for Linux, macOS and Windows.
The benchmarks in the repository compare throughput against Python subprocess-based vector environments and for-loops on machines from 12 to 256 CPU cores.
Key features
- 01Batched environment stepping through a C++ thread pool with pybind11 bindings.
- 02Compatible with Gymnasium and dm_env APIs.
- 03Supports synchronous and asynchronous execution, including single and multi-player environments.
- 04Covers many environment families such as Atari, MuJoCo, DeepMind Control and Procgen.
- 05Batched rgb_array rendering and XLA support with JAX jit.
Use cases
- Speeding up data collection for reinforcement learning training on multi-core machines.
- Running Atari or MuJoCo experiments with libraries such as Stable-Baselines3, Tianshou or CleanRL.
- Adding a custom environment with a high-throughput C++ implementation.
Quick start
- 1
Install EnvPool from PyPI
pip install envpool - 2
Open a Python console and import envpool to confirm the install worked
Things to know
- Linux MuJoCo rendering needs the system EGL/OpenGL runtime, such as libegl1, libopengl0 and libgl1-mesa-dri on Ubuntu.
- On Linux, Procgen environments need a separately installed system Qt 5 runtime, and building from source also requires Qt 5.
In collections
Topics
FAQ
- What is envpool?
- A C++ batched environment pool for reinforcement learning that runs many Gym-style environments in parallel with a thread pool. EnvPool is a parallel execution engine for reinforcement learning environments. It manages a pool of environments in C++ with a thread pool and exposes them to Python through pybind11, so one call can step many environments at once. It supports both Gymnasium and dm_env style APIs, in synchronous and asynchronous modes, with batched interaction by default.
- Is envpool free to use? What license does it have?
- envpool is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is envpool still maintained?
- Actively maintained. The last commit to envpool was on Oct 21, 2026.
- What can I use envpool for?
- Speeding up data collection for reinforcement learning training on multi-core machines. Running Atari or MuJoCo experiments with libraries such as Stable-Baselines3, Tianshou or CleanRL. Adding a custom environment with a high-throughput C++ implementation.
- How do I install envpool?
- Install EnvPool from PyPI: pip install envpool Open a Python console and import envpool to confirm the install worked
- Where can I get envpool?
- The source code and installation instructions are on GitHub: https://github.com/sail-sg/envpool
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A standard Python API for single-agent reinforcement learning environments, plus a set of reference environments, forked from OpenAI's Gym.
A performance-focused 2D robot simulator for ROS that runs robot models in lightweight flat-world environments.
PyTorch implementations of reinforcement learning algorithms, designed as a reliable, consistent baseline for research and applications.
An open-source simulator built on Unreal Engine for drones, cars and other autonomous vehicles, with APIs for AI and computer vision research.
Open-source simulator for autonomous driving research, providing urban environments, digital assets, and sensor simulation built on Unreal Engine.