EnvPool is a C++-based batched environment pool with pybind11 and thread pool. It has high performance (~1M raw FPS on Atari games / ~3M FPS with Mujoco physics engine in DGX-A100) and compatible APIs (supports both gym and dm_env, both sync and async, both single and multi player environment).
Here are EnvPool's several highlights:
- Compatible with OpenAI
gymAPIs and DeepMinddm_envAPIs; - Manage a pool of envs, interact with the envs in batched APIs by default;
- Support both synchronous execution and asynchronous execution;
- Support both single player and multi-player environment;
- Easy C++ developer API to add new envs: Customized C++ environment integration;
- Free ~2x speedup with only single environment;
- 1 Million Atari frames / 3 Million Mujoco steps per second simulation with 256 CPU cores, ~20x throughput of Python subprocess-based vector env;
- ~3x throughput of Python subprocess-based vector env on low resource setup like 12 CPU cores;
- XLA support with JAX jit function;
- Comparing with the existing GPU-based solution (Brax / Isaac-gym), EnvPool is a general solution for various kinds of speeding-up RL environment parallelization;
- Compatible with some existing RL libraries, e.g., Stable-Baselines3, Tianshou, ACME, CleanRL (Solving Pong in 5 mins), rl_games (2 mins Pong, 15 mins Breakout, 5 mins Ant and HalfCheetah).
EnvPool is currently hosted on PyPI. It supports Python 3.10-3.13.
You can install EnvPool with the following command:
$ pip install envpoolAfter installation, open a Python console and type
import envpool print(envpool.__version__)
If no error occurs, you have successfully installed EnvPool.
EnvPool is still under development; you can also check out the documents in stable version through envpool.readthedocs.io/en/stable/.
.. toctree:: :maxdepth: 1 :caption: Content content/slides content/build content/python_interface content/xla_interface content/benchmark content/new_env content/contributing
.. toctree:: :maxdepth: 1 :caption: Environment env/atari env/box2d env/classic_control env/dm_control env/minigrid env/mujoco_gym env/procgen env/toy_text env/vizdoom