[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-sail-sg--envpool":3,"tool-sail-sg--envpool":65},[4,23,32,40,49,57],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":22},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85013,2,"2026-04-06T11:09:19",[13,14,15,16,17,18,19,20,21],"图像","数据工具","视频","插件","Agent","其他","语言模型","开发框架","音频","ready",{"id":24,"name":25,"github_repo":26,"description_zh":27,"stars":28,"difficulty_score":29,"last_commit_at":30,"category_tags":31,"status":22},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,3,"2026-04-04T04:44:48",[17,13,20,19,18],{"id":33,"name":34,"github_repo":35,"description_zh":36,"stars":37,"difficulty_score":29,"last_commit_at":38,"category_tags":39,"status":22},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",74991,"2026-04-06T23:16:49",[19,13,20,18],{"id":41,"name":42,"github_repo":43,"description_zh":44,"stars":45,"difficulty_score":46,"last_commit_at":47,"category_tags":48,"status":22},3215,"awesome-machine-learning","josephmisiti\u002Fawesome-machine-learning","awesome-machine-learning 是一份精心整理的机器学习资源清单，汇集了全球优秀的机器学习框架、库和软件工具。面对机器学习领域技术迭代快、资源分散且难以甄选的痛点，这份清单按编程语言（如 Python、C++、Go 等）和应用场景（如计算机视觉、自然语言处理、深度学习等）进行了系统化分类，帮助使用者快速定位高质量项目。\n\n它特别适合开发者、数据科学家及研究人员使用。无论是初学者寻找入门库，还是资深工程师对比不同语言的技术选型，都能从中获得极具价值的参考。此外，清单还延伸提供了免费书籍、在线课程、行业会议、技术博客及线下聚会等丰富资源，构建了从学习到实践的全链路支持体系。\n\n其独特亮点在于严格的维护标准：明确标记已停止维护或长期未更新的项目，确保推荐内容的时效性与可靠性。作为机器学习领域的“导航图”，awesome-machine-learning 以开源协作的方式持续更新，旨在降低技术探索门槛，让每一位从业者都能高效地站在巨人的肩膀上创新。",72149,1,"2026-04-03T21:50:24",[20,18],{"id":50,"name":51,"github_repo":52,"description_zh":53,"stars":54,"difficulty_score":46,"last_commit_at":55,"category_tags":56,"status":22},2234,"scikit-learn","scikit-learn\u002Fscikit-learn","scikit-learn 是一个基于 Python 构建的开源机器学习库，依托于 SciPy、NumPy 等科学计算生态，旨在让机器学习变得简单高效。它提供了一套统一且简洁的接口，涵盖了从数据预处理、特征工程到模型训练、评估及选择的全流程工具，内置了包括线性回归、支持向量机、随机森林、聚类等在内的丰富经典算法。\n\n对于希望快速验证想法或构建原型的数据科学家、研究人员以及 Python 开发者而言，scikit-learn 是不可或缺的基础设施。它有效解决了机器学习入门门槛高、算法实现复杂以及不同模型间调用方式不统一的痛点，让用户无需重复造轮子，只需几行代码即可调用成熟的算法解决分类、回归、聚类等实际问题。\n\n其核心技术亮点在于高度一致的 API 设计风格，所有估算器（Estimator）均遵循相同的调用逻辑，极大地降低了学习成本并提升了代码的可读性与可维护性。此外，它还提供了强大的模型选择与评估工具，如交叉验证和网格搜索，帮助用户系统地优化模型性能。作为一个由全球志愿者共同维护的成熟项目，scikit-learn 以其稳定性、详尽的文档和活跃的社区支持，成为连接理论学习与工业级应用的最",65644,"2026-04-06T10:25:08",[20,18,14],{"id":58,"name":59,"github_repo":60,"description_zh":61,"stars":62,"difficulty_score":10,"last_commit_at":63,"category_tags":64,"status":22},3364,"keras","keras-team\u002Fkeras","Keras 是一个专为人类设计的深度学习框架，旨在让构建和训练神经网络变得简单直观。它解决了开发者在不同深度学习后端之间切换困难、模型开发效率低以及难以兼顾调试便捷性与运行性能的痛点。\n\n无论是刚入门的学生、专注算法的研究人员，还是需要快速落地产品的工程师，都能通过 Keras 轻松上手。它支持计算机视觉、自然语言处理、音频分析及时间序列预测等多种任务。\n\nKeras 3 的核心亮点在于其独特的“多后端”架构。用户只需编写一套代码，即可灵活选择 TensorFlow、JAX、PyTorch 或 OpenVINO 作为底层运行引擎。这一特性不仅保留了 Keras 一贯的高层易用性，还允许开发者根据需求自由选择：利用 JAX 或 PyTorch 的即时执行模式进行高效调试，或切换至速度最快的后端以获得最高 350% 的性能提升。此外，Keras 具备强大的扩展能力，能无缝从本地笔记本电脑扩展至大规模 GPU 或 TPU 集群，是连接原型开发与生产部署的理想桥梁。",63927,"2026-04-04T15:24:37",[20,14,18],{"id":66,"github_repo":67,"name":68,"description_en":69,"description_zh":70,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":80,"owner_twitter":80,"owner_website":81,"owner_url":82,"languages":83,"stars":111,"forks":112,"last_commit_at":113,"license":114,"difficulty_score":10,"env_os":115,"env_gpu":116,"env_ram":117,"env_deps":118,"category_tags":128,"github_topics":129,"view_count":10,"oss_zip_url":80,"oss_zip_packed_at":80,"status":22,"created_at":144,"updated_at":145,"faqs":146,"releases":175},4853,"sail-sg\u002Fenvpool","envpool","C++-based high-performance parallel environment execution engine (vectorized env) for general RL environments.","EnvPool 是一款基于 C++ 构建的高性能并行环境执行引擎，专为强化学习（RL）任务设计。在强化学习训练中，传统 Python 环境往往因串行执行效率低下而成为瓶颈，EnvPool 通过引入向量化环境与线程池技术，有效解决了这一难题，能够轻松管理成百上千个并行环境实例。\n\n无论是算法研究人员还是工程开发者，只要需要加速 RL 模型训练，EnvPool 都是理想选择。它完美兼容 OpenAI Gym、DeepMind dm_env 及 Gymnasium 等主流接口，支持同步与异步执行模式，并涵盖 Atari、Mujoco、Box2D 等多种经典环境。其核心亮点在于极致的运行效率：在标准硬件上即可实现比传统 Python 多进程方案快 3 到 20 倍的数据吞吐量，单卡环境下甚至能达成每秒百万级的帧处理速度。此外，EnvPool 不仅提供便捷的 Python 调用方式，还开放了 C++ 开发接口以便用户自定义扩展，并支持 JAX XLA 加速。作为一个通用且高效的底层基础设施，EnvPool 能帮助使用者大幅缩短实验迭代周期，让研究重心回归算法本身。","\u003Cdiv align=\"center\">\n  \u003Ca href=\"http:\u002F\u002Fenvpool.readthedocs.io\">\u003Cimg width=\"666px\" height=\"auto\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsail-sg_envpool_readme_2028c869fc05.png\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n---\n\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fenvpool)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fenvpool\u002F) [![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsail-sg_envpool_readme_fe6bf83c900b.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fenvpool) [![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2206.10558-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2206.10558) [![Read the Docs](https:\u002F\u002Fimg.shields.io\u002Freadthedocs\u002Fenvpool)](https:\u002F\u002Fenvpool.readthedocs.io\u002F) [![Unittest](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Factions\u002Fworkflows\u002Ftest.yml) [![Coverage](https:\u002F\u002Fsail-sg.github.io\u002Fenvpool\u002Fcoverage-badge.svg)](https:\u002F\u002Fsail-sg.github.io\u002Fenvpool\u002F) [![GitHub issues](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002Fsail-sg\u002Fenvpool)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fissues) [![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsail-sg\u002Fenvpool)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fstargazers) [![GitHub forks](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fsail-sg\u002Fenvpool)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fnetwork) [![GitHub license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fsail-sg\u002Fenvpool)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002FLICENSE)\n\n**EnvPool** is a C++-based batched environment pool with pybind11 and thread pool. It has high performance (\\~1M raw FPS with Atari games, \\~3M raw FPS with Mujoco simulator on DGX-A100) and compatible APIs (supports both gym and dm\\_env, both sync and async, both single and multi player environment). Currently it supports:\n\n- [x] [Atari games](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fatari.html)\n- [x] [Mujoco (gym)](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fmujoco_gym.html)\n- [x] [Classic control RL envs](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fclassic_control.html): CartPole, MountainCar, Pendulum, Acrobot\n- [x] [Toy text RL envs](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Ftoy_text.html): Catch, FrozenLake, Taxi, NChain, CliffWalking, Blackjack\n- [x] [ViZDoom single player](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fvizdoom.html)\n- [x] [DeepMind Control Suite](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fdm_control.html)\n- [x] [Box2D](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fbox2d.html)\n- [x] [Procgen](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fprocgen.html)\n- [x] [Minigrid](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fminigrid.html)\n\nHere are EnvPool's several highlights:\n\n- Compatible with OpenAI `gym` APIs, DeepMind `dm_env` APIs, and [`gymnasium`](https:\u002F\u002Fgithub.com\u002FFarama-Foundation\u002FGymnasium) APIs;\n- Manage a pool of envs, interact with the envs in batched APIs by default;\n- Support both synchronous execution and asynchronous execution;\n- Support both single player and multi-player environment;\n- Easy C++ developer API to add new envs: [Customized C++ environment integration](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fnew_env.html);\n- Free **\\~2x** speedup with only single environment;\n- **1 Million** Atari frames \u002F **3 Million** Mujoco steps per second simulation with 256 CPU cores, **~20x** throughput of Python subprocess-based vector env;\n- **~3x** throughput of Python subprocess-based vector env on low resource setup like 12 CPU cores;\n- Comparing with existing GPU-based solution ([Brax](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fbrax) \u002F [Isaac-gym](https:\u002F\u002Fdeveloper.nvidia.com\u002Fisaac-gym)), EnvPool is a **general** solution for various kinds of speeding-up RL environment parallelization;\n- XLA support with JAX jit function: [XLA Interface](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fxla_interface.html);\n- Compatible with some existing RL libraries, e.g., [Stable-Baselines3](https:\u002F\u002Fgithub.com\u002FDLR-RM\u002Fstable-baselines3), [Tianshou](https:\u002F\u002Fgithub.com\u002Fthu-ml\u002Ftianshou), [ACME](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Facme), [CleanRL](https:\u002F\u002Fgithub.com\u002Fvwxyzjn\u002Fcleanrl), or [rl\\_games](https:\u002F\u002Fgithub.com\u002FDenys88\u002Frl_games).\n  - Stable-Baselines3 [`Pendulum-v1` example](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Fsb3_examples\u002Fppo.py);\n  - Tianshou [`CartPole` example](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Ftianshou_examples\u002Fcartpole_ppo.py), [`Pendulum-v1` example](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Ftianshou_examples\u002Fpendulum_ppo.py), [Atari example](https:\u002F\u002Fgithub.com\u002Fthu-ml\u002Ftianshou\u002Ftree\u002Fmaster\u002Fexamples\u002Fatari#envpool), [Mujoco example](https:\u002F\u002Fgithub.com\u002Fthu-ml\u002Ftianshou\u002Ftree\u002Fmaster\u002Fexamples\u002Fmujoco#envpool), and [integration guideline](https:\u002F\u002Ftianshou.readthedocs.io\u002Fen\u002Fmaster\u002Ftutorials\u002Fcheatsheet.html#envpool-integration);\n  - ACME [`HalfCheetah` example](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Facme_examples\u002Fppo_continuous.py);\n  - CleanRL [`Pong-v5` example](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Fcleanrl_examples\u002Fppo_atari_envpool.py) ([Solving Pong in 5 mins](https:\u002F\u002Ficlr-blog-track.github.io\u002F2022\u002F03\u002F25\u002Fppo-implementation-details\u002F#solving-pong-in-5-minutes-with-ppo--envpool) ([tracked experiment](https:\u002F\u002Fwandb.ai\u002Fcosta-huang\u002FcleanRL\u002Fruns\u002Fopk2dmta)));\n  - rl\\_games [Atari example](https:\u002F\u002Fgithub.com\u002FDenys88\u002Frl_games\u002Fblob\u002Fmaster\u002Fdocs\u002FATARI_ENVPOOL.md) ([2 mins Pong](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fdemo\u002Fenvpool_demo_pong.ipynb) and [15 mins Breakout](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fdemo\u002Fenvpool_demo_breakout.ipynb)) and [Mujoco example](https:\u002F\u002Fgithub.com\u002FDenys88\u002Frl_games\u002Fblob\u002Fmaster\u002Fdocs\u002FMUJOCO_ENVPOOL.md) (5 mins [Ant](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fdemo\u002Fenvpool_demo_ant.ipynb) and [HalfCheetah](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fdemo\u002Fenvpool_demo_halfcheetah.ipynb)).\n\nCheck out our [arXiv paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2206.10558) for more details!\n\n## Installation\n\n### PyPI\n\nEnvPool is currently hosted on [PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002Fenvpool\u002F). It supports Python 3.11-3.14 on Linux, macOS, and Windows.\n\nYou can simply install EnvPool with the following command:\n\n```bash\n$ pip install envpool\n```\n\nAfter installation, open a Python console and type\n\n```python\nimport envpool\nprint(envpool.__version__)\n```\n\nIf no error occurs, you have successfully installed EnvPool.\n\nPlatform notes:\n\n- PyPI wheels do not require a separate Qt installation at runtime.\n- Windows Procgen wheels bundle the required Qt runtime DLLs (`Qt5Core.dll`\n  and `Qt5Gui.dll`) next to the extension module.\n- Windows source\u002Frelease CI validates MuJoCo rendering with Mesa software\n  OpenGL. To reproduce that setup locally, point `ENVPOOL_DLL_DIR` at a Mesa\n  DLL directory and set `GALLIUM_DRIVER=llvmpipe` plus\n  `MESA_GL_VERSION_OVERRIDE=4.5COMPAT`.\n- Building from source still requires platform-local build dependencies,\n  including Qt 5. The full per-platform setup is documented in\n  [Build From Source](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fbuild.html).\n\n### From Source\n\nPlease refer to the [guideline](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fbuild.html).\n\n## Documentation\n\nThe tutorials and API documentation are hosted on [envpool.readthedocs.io](https:\u002F\u002Fenvpool.readthedocs.io).\n\nThe example scripts are under [examples\u002F](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Ftree\u002Fmain\u002Fexamples) folder; benchmark scripts are under [benchmark\u002F](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Ftree\u002Fmain\u002Fbenchmark) folder.\n\n## Benchmark Results\n\nThe historical benchmark tables below were produced with ALE Atari environment\n`PongNoFrameskip-v4` (with environment wrappers from [OpenAI\nBaselines](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fbaselines\u002Fblob\u002Fmaster\u002Fbaselines\u002Fcommon\u002Fatari_wrappers.py))\nand Mujoco environment `Ant-v3` on different hardware setups, including a\nTPUv3-8 virtual machine (VM) of 96 CPU cores and 2 NUMA nodes, and an NVIDIA\nDGX-A100 of 256 CPU cores with 8 NUMA nodes. The current scripts under\n[`benchmark\u002F`](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Ftree\u002Fmain\u002Fbenchmark) use\nGymnasium's `ALE\u002FPong-v5` and `Ant-v5`. Baselines include 1) naive Python\nfor-loop; 2) the most popular RL environment parallelization execution by\nPython subprocess, e.g.,\n[gym.vector_env](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fgym\u002Fblob\u002Fmaster\u002Fgym\u002Fvector\u002Fvector_env.py);\n3) to our knowledge, the fastest RL environment executor [Sample\nFactory](https:\u002F\u002Fgithub.com\u002Falex-petrenko\u002Fsample-factory) before EnvPool.\n\nWe report EnvPool performance with sync mode, async mode, and NUMA + async mode, compared with the baselines on different number of workers (i.e., number of CPU cores). As we can see from the results, EnvPool achieves significant improvements over the baselines on all settings. On the high-end setup, EnvPool achieves 1 Million frames per second with Atari and 3 Million frames per second with Mujoco on 256 CPU cores, which is 14.9x \u002F 19.6x of the `gym.vector_env` baseline. On a typical PC setup with 12 CPU cores, EnvPool's throughput is 3.1x \u002F 2.9x of `gym.vector_env`.\n\n|  Atari Highest FPS   | Laptop (12) | Workstation (32) | TPU-VM (96) | DGX-A100 (256) |\n| :------------------: | :---------: | :--------------: | :---------: | :------------: |\n|       For-loop       |    4,893    |      7,914       |    3,993    |     4,640      |\n|      Subprocess      |   15,863    |      47,699      |   46,910    |     71,943     |\n|    Sample-Factory    |   28,216    |     138,847      |   222,327   |    707,494     |\n|    EnvPool (sync)    |   37,396    |     133,824      |   170,380   |    427,851     |\n|   EnvPool (async)    | **49,439**  |   **200,428**    |   359,559   |    891,286     |\n| EnvPool (numa+async) |      \u002F      |        \u002F         | **373,169** | **1,069,922**  |\n\n|  Mujoco Highest FPS  | Laptop (12) | Workstation (32) | TPU-VM (96) | DGX-A100 (256) |\n| :------------------: | :---------: | :--------------: | :---------: | :------------: |\n|       For-loop       |   12,861    |      20,298      |   10,474    |     11,569     |\n|      Subprocess      |   36,586    |     105,432      |   87,403    |    163,656     |\n|    Sample-Factory    |   62,510    |     309,264      |   461,515   |   1,573,262    |\n|    EnvPool (sync)    |   66,622    |     380,950      |   296,681   |    949,787     |\n|   EnvPool (async)    | **105,126** |   **582,446**    |   887,540   |   2,363,864    |\n| EnvPool (numa+async) |      \u002F      |        \u002F         | **896,830** | **3,134,287**  |\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsail-sg_envpool_readme_0189bef7b298.png)\n\n\nPlease refer to the [benchmark](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fbenchmark.html) page for more details.\n\n## API Usage\n\nThe following content shows both synchronous and asynchronous API usage of EnvPool. You can also run the full script at [examples\u002Fenv_step.py](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Fenv_step.py)\n\n### Synchronous API\n\n```python\nimport envpool\nimport numpy as np\n\n# make gym env\nenv = envpool.make(\"Pong-v5\", env_type=\"gym\", num_envs=100)\n# or use envpool.make_gym(...)\nobs = env.reset()  # should be (100, 4, 84, 84)\nact = np.zeros(100, dtype=int)\nobs, rew, term, trunc, info = env.step(act)\n```\n\nUnder the synchronous mode, `envpool` closely resembles `openai-gym`\u002F`dm-env`. It has the `reset` and `step` functions with the same meaning. However, there is one exception in `envpool`: batch interaction is the default. Therefore, during the creation of the envpool, there is a `num_envs` argument that denotes how many envs you like to run in parallel.\n\n```python\nenv = envpool.make(\"Pong-v5\", env_type=\"gym\", num_envs=100)\n```\n\nThe first dimension of `action` passed to the step function should equal `num_envs`.\n\n```python\nact = np.zeros(100, dtype=int)\n```\n\nYou don't need to manually reset one environment when any of `done` is true; instead, all envs in `envpool` have enabled auto-reset by default.\n\n### Asynchronous API\n\n```python\nimport envpool\nimport numpy as np\n\n# make asynchronous\nnum_envs = 64\nbatch_size = 16\nenv = envpool.make(\"Pong-v5\", env_type=\"gym\", num_envs=num_envs, batch_size=batch_size)\naction_num = env.action_space.n\nenv.async_reset()  # send the initial reset signal to all envs\nwhile True:\n    obs, rew, term, trunc, info = env.recv()\n    env_id = info[\"env_id\"]\n    action = np.random.randint(action_num, size=batch_size)\n    env.send(action, env_id)\n```\n\nIn the asynchronous mode, the `step` function is split into two parts: the `send`\u002F`recv` functions. `send` takes two arguments, a batch of action, and the corresponding `env_id` that each action should be sent to. Unlike `step`, `send` does not wait for the envs to execute and return the next state, it returns immediately after the actions are fed to the envs. (The reason why it is called async mode).\n\n```python\nenv.send(action, env_id)\n```\nTo get the \"next states\", we need to call the `recv` function. However, `recv` does not guarantee that you will get back the \"next states\" of the envs you just called `send` on. Instead, whatever envs finishes execution gets `recv`ed first.\n\n```python\nstate = env.recv()\n```\n\nBesides `num_envs`, there is one more argument `batch_size`. While `num_envs` defines how many envs in total are managed by the `envpool`, `batch_size` specifies the number of envs involved each time we interact with `envpool`. e.g. There are 64 envs executing in the `envpool`, `send` and `recv` each time interacts with a batch of 16 envs.\n\n```python\nenvpool.make(\"Pong-v5\", env_type=\"gym\", num_envs=64, batch_size=16)\n```\n\nThere are other configurable arguments with `envpool.make`; please check out [EnvPool Python interface introduction](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fpython_interface.html).\n\n### Rendering\n\nEnvPool exposes rendering through the Python wrapper. Create the env with\n`render_mode=\"rgb_array\"` to get batched RGB output, or\n`render_mode=\"human\"` to display a single env through OpenCV.\n\n```python\nimport envpool\n\nenv = envpool.make(\n    \"Ant-v5\",\n    env_type=\"gymnasium\",\n    num_envs=4,\n    render_mode=\"rgb_array\",\n    render_width=480,\n    render_height=480,\n)\nenv.reset()\nframes = env.render(env_ids=[0, 2])\nassert frames.shape == (2, 480, 480, 3)\n```\n\n`render()` is batch-first, so even a single render keeps the batch dimension:\n`env.render().shape == (1, H, W, 3)`. If `env_ids` is omitted, EnvPool renders\n`render_env_id` (default `0`). `camera_id` can be overridden per call, while\nthe output size is fixed at env creation time via `render_width` and\n`render_height`.\n\nThe repo test suite also exercises rendering. `make bazel-test` runs repeated\nrender checks for every render-capable env family, and `make release-test`\nincludes a wheel smoke that calls `render()` after `reset()`. On Windows, the\nMuJoCo render tests use the same `ENVPOOL_DLL_DIR` Mesa preload hook described\nabove when you want software OpenGL instead of the system driver.\n\n```python\nviewer = envpool.make(\n    \"WalkerWalk-v1\",\n    env_type=\"gymnasium\",\n    num_envs=1,\n    render_mode=\"human\",\n    render_env_id=0,\n)\nviewer.reset()\nviewer.render()\n```\n\n`render_mode=\"human\"` returns `None` and currently supports a single env id per\ncall. It also requires `opencv-python` to be installed.\n\n### Pixel Observations\n\nFor MuJoCo tasks, pixel observations can also be exposed directly through the\nregular observation API by passing `from_pixels=True`. This path is produced\nnatively in C++, without routing through Python-side `render()`.\n\n```python\npixels = envpool.make(\n    \"WalkerWalk-v1\",\n    env_type=\"gymnasium\",\n    num_envs=2,\n    from_pixels=True,\n    frame_stack=3,\n    render_width=84,\n    render_height=84,\n)\nobs, info = pixels.reset()\nassert obs.shape == (2, 9, 84, 84)\n```\n\nPixel observations use channel-first layout. With `frame_stack=1`, each\nenvironment returns `(3, H, W)`; with `frame_stack=3`, EnvPool stacks frames on\nthe channel dimension and returns `(9, H, W)`. This matches the usual PyTorch\n`BCHW` convention directly. If `render_width` \u002F `render_height` are omitted,\nEnvPool defaults them to `84`.\n\n## Contributing\n\nEnvPool is still under development. More environments will be added, and we always welcome contributions to help EnvPool better. If you would like to contribute, please check out our [contribution guideline](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fcontributing.html).\n\n## License\n\nEnvPool is under Apache2 license.\n\nOther third-party source-code and data are under their corresponding licenses.\n\nWe do not include their source code and data in this repo.\n\n## Citing EnvPool\n\nIf you find EnvPool useful, please cite it in your publications.\n\n```latex\n@inproceedings{weng2022envpool,\n author = {Weng, Jiayi and Lin, Min and Huang, Shengyi and Liu, Bo and Makoviichuk, Denys and Makoviychuk, Viktor and Liu, Zichen and Song, Yufan and Luo, Ting and Jiang, Yukun and Xu, Zhongwen and Yan, Shuicheng},\n booktitle = {Advances in Neural Information Processing Systems},\n editor = {S. Koyejo and S. Mohamed and A. Agarwal and D. Belgrave and K. Cho and A. Oh},\n pages = {22409--22421},\n publisher = {Curran Associates, Inc.},\n title = {Env{P}ool: A Highly Parallel Reinforcement Learning Environment Execution Engine},\n url = {https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2022\u002Ffile\u002F8caaf08e49ddbad6694fae067442ee21-Paper-Datasets_and_Benchmarks.pdf},\n volume = {35},\n year = {2022}\n}\n```\n\n## Disclaimer\n\nThis is not an official Sea Limited or Garena Online Private Limited product.\n","\u003Cdiv align=\"center\">\n  \u003Ca href=\"http:\u002F\u002Fenvpool.readthedocs.io\">\u003Cimg width=\"666px\" height=\"auto\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsail-sg_envpool_readme_2028c869fc05.png\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n---\n\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fenvpool)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fenvpool\u002F) [![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsail-sg_envpool_readme_fe6bf83c900b.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fenvpool) [![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2206.10558-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2206.10558) [![Read the Docs](https:\u002F\u002Fimg.shields.io\u002Freadthedocs\u002Fenvpool)](https:\u002F\u002Fenvpool.readthedocs.io\u002F) [![Unittest](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Factions\u002Fworkflows\u002Ftest.yml) [![Coverage](https:\u002F\u002Fsail-sg.github.io\u002Fenvpool\u002Fcoverage-badge.svg)](https:\u002F\u002Fsail-sg.github.io\u002Fenvpool\u002F) [![GitHub issues](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002Fsail-sg\u002Fenvpool)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fissues) [![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsail-sg\u002Fenvpool)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fstargazers) [![GitHub forks](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fsail-sg\u002Fenvpool)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fnetwork) [![GitHub license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fsail-sg\u002Fenvpool)](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002FLICENSE)\n\n**EnvPool** 是一个基于 C++ 的批处理环境池，结合了 pybind11 和线程池技术。它具有高性能（在 Atari 游戏上可达约 100 万帧\u002F秒，在 Mujoco 模拟器上使用 DGX-A100 可达约 300 万步\u002F秒）以及兼容的 API 接口（同时支持 gym 和 dm_env，同步与异步模式，单人及多人环境）。目前支持以下环境：\n\n- [x] [Atari 游戏](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fatari.html)\n- [x] [Mujoco (gym)](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fmujoco_gym.html)\n- [x] [经典控制强化学习环境](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fclassic_control.html)：CartPole、MountainCar、Pendulum、Acrobot\n- [x] [Toy text 强化学习环境](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Ftoy_text.html)：Catch、FrozenLake、Taxi、NChain、CliffWalking、Blackjack\n- [x] [ViZDoom 单人模式](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fvizdoom.html)\n- [x] [DeepMind Control Suite](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fdm_control.html)\n- [x] [Box2D](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fbox2d.html)\n- [x] [Procgen](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fprocgen.html)\n- [x] [Minigrid](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fminigrid.html)\n\n以下是 EnvPool 的几大亮点：\n\n- 兼容 OpenAI `gym` API、DeepMind `dm_env` API 以及 [`gymnasium`](https:\u002F\u002Fgithub.com\u002FFarama-Foundation\u002FGymnasium) API；\n- 管理一个环境池，默认以批处理方式与环境交互；\n- 同时支持同步执行和异步执行；\n- 支持单人和多人环境；\n- 提供易于使用的 C++ 开发者 API，方便添加新环境：[自定义 C++ 环境集成](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fnew_env.html)；\n- 即使仅使用单个环境，也能获得约 **2 倍** 的速度提升；\n- 在 256 核 CPU 上，可实现每秒 **100 万帧** 的 Atari 游戏模拟或 **300 万步** 的 Mujoco 步骤模拟，吞吐量是基于 Python 子进程的向量化环境的 **20 倍**；\n- 在低资源环境下（如 12 核 CPU），吞吐量仍是基于 Python 子进程的向量化环境的 **3 倍**；\n- 与现有的 GPU 加速方案（如 [Brax](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fbrax) 或 [Isaac-gym](https:\u002F\u002Fdeveloper.nvidia.com\u002Fisaac-gym)）相比，EnvPool 是一种适用于多种场景的通用解决方案，能够显著加速强化学习中的环境并行化；\n- 支持 XLA，可通过 JAX jit 函数实现加速：[XLA 接口](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fxla_interface.html)；\n- 与一些现有的强化学习库兼容，例如 [Stable-Baselines3](https:\u002F\u002Fgithub.com\u002FDLR-RM\u002Fstable-baselines3)、[Tianshou](https:\u002F\u002Fgithub.com\u002Fthu-ml\u002Ftianshou)、[ACME](https:\u002F\u002Fgithub.com\u002Fdeepmind\u002Facme)、[CleanRL](https:\u002F\u002Fgithub.com\u002Fvwxyzjn\u002Fcleanrl) 或 [rl_games](https:\u002F\u002Fgithub.com\u002FDenys88\u002Frl_games)。\n  - Stable-Baselines3 [`Pendulum-v1` 示例](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Fsb3_examples\u002Fppo.py)；\n  - Tianshou [`CartPole` 示例](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Ftianshou_examples\u002Fcartpole_ppo.py)、[`Pendulum-v1` 示例](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Ftianshou_examples\u002Fpendulum_ppo.py)、[Atari 示例](https:\u002F\u002Fgithub.com\u002Fthu-ml\u002Ftianshou\u002Ftree\u002Fmaster\u002Fexamples\u002Fatari#envpool)、[Mujoco 示例](https:\u002F\u002Fgithub.com\u002Fthu-ml\u002Ftianshou\u002Ftree\u002Fmaster\u002Fexamples\u002Fmujoco#envpool)，以及[集成指南](https:\u002F\u002Ftianshou.readthedocs.io\u002Fen\u002Fmaster\u002Ftutorials\u002Fcheatsheet.html#envpool-integration)；\n  - ACME [`HalfCheetah` 示例](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Facme_examples\u002Fppo_continuous.py)；\n  - CleanRL [`Pong-v5` 示例](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Fcleanrl_examples\u002Fppo_atari_envpool.py)（[用 PPO 和 EnvPool 在 5 分钟内解决 Pong 问题](https:\u002F\u002Ficlr-blog-track.github.io\u002F2022\u002F03\u002F25\u002Fppo-implementation-details\u002F#solving-pong-in-5-minutes-with-ppo--envpool)；[实验追踪](https:\u002F\u002Fwandb.ai\u002Fcosta-huang\u002FcleanRL\u002Fruns\u002Fopk2dmta))；\n  - rl_games [Atari 示例](https:\u002F\u002Fgithub.com\u002FDenys88\u002Frl_games\u002Fblob\u002Fmaster\u002Fdocs\u002FATARI_ENVPOOL.md)（[2 分钟搞定 Pong](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fdemo\u002Fenvpool_demo_pong.ipynb) 和 [15 分钟完成 Breakout](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fdemo\u002Fenvpool_demo_breakout.ipynb)）以及 [Mujoco 示例](https:\u002F\u002Fgithub.com\u002FDenys88\u002Frl_games\u002Fblob\u002Fmaster\u002Fdocs\u002FMUJOCO_ENVPOOL.md)（5 分钟搞定 [Ant](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fdemo\u002Fenvpool_demo_ant.ipynb) 和 [HalfCheetah](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fdemo\u002Fenvpool_demo_halfcheetah.ipynb)）。\n\n更多详细信息请参阅我们的 [arXiv 论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2206.10558)！\n\n## 安装\n\n### PyPI\n\nEnvPool 目前托管在 [PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002Fenvpool\u002F) 上，支持 Linux、macOS 和 Windows 平台上的 Python 3.11 至 3.14。\n\n您只需运行以下命令即可安装 EnvPool：\n\n```bash\n$ pip install envpool\n```\n\n安装完成后，打开 Python 控制台并输入：\n\n```python\nimport envpool\nprint(envpool.__version__)\n```\n\n如果没有报错，则说明您已成功安装 EnvPool。\n\n平台注意事项：\n\n- PyPI 发布的二进制包无需在运行时单独安装 Qt。\n- Windows 版本的 Procgen 包含所需的 Qt 运行时 DLL 文件（`Qt5Core.dll` 和 `Qt5Gui.dll`），并与扩展模块一同打包。\n- Windows 的源码\u002F发布 CI 使用 Mesa 软件 OpenGL 来验证 MuJoCo 的渲染效果。若要在本地复现该设置，请将 `ENVPOOL_DLL_DIR` 指向 Mesa DLL 目录，并设置 `GALLIUM_DRIVER=llvmpipe` 以及 `MESA_GL_VERSION_OVERRIDE=4.5COMPAT`。\n- 从源码构建仍需依赖平台特定的编译工具链，包括 Qt 5。完整的平台配置说明请参阅 [从源码构建](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fbuild.html)。\n\n### 从源代码\n\n请参阅[指南](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fbuild.html)。\n\n## 文档\n\n教程和 API 文档托管在 [envpool.readthedocs.io](https:\u002F\u002Fenvpool.readthedocs.io) 上。\n\n示例脚本位于 [examples\u002F](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Ftree\u002Fmain\u002Fexamples) 文件夹中；基准测试脚本位于 [benchmark\u002F](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Ftree\u002Fmain\u002Fbenchmark) 文件夹中。\n\n## 基准测试结果\n\n以下历史基准测试表格是在不同的硬件配置下生成的，使用的环境包括 ALE Atari 环境 `PongNoFrameskip-v4`（带有来自 [OpenAI Baselines](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fbaselines\u002Fblob\u002Fmaster\u002Fbaselines\u002Fcommon\u002Fatari_wrappers.py) 的环境包装器）和 Mujoco 环境 `Ant-v3`。硬件配置包括一台拥有 96 个 CPU 核心、2 个 NUMA 节点的 TPUv3-8 虚拟机，以及一台拥有 256 个 CPU 核心、8 个 NUMA 节点的 NVIDIA DGX-A100。当前位于 [`benchmark\u002F`](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Ftree\u002Fmain\u002Fbenchmark) 中的脚本使用的是 Gymnasium 的 `ALE\u002FPong-v5` 和 `Ant-v5`。基准对比包括：1) 原生 Python for 循环；2) 最流行的基于 Python 子进程的强化学习环境并行化执行方式，例如 [gym.vector_env](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fgym\u002Fblob\u002Fmaster\u002Fgym\u002Fvector\u002Fvector_env.py)；3) 据我们所知，在 EnvPool 出现之前最快的强化学习环境执行器 [Sample Factory](https:\u002F\u002Fgithub.com\u002Falex-petrenko\u002Fsample-factory)。\n\n我们报告了 EnvPool 在同步模式、异步模式以及 NUMA + 异步模式下的性能，并将其与不同数量的工作进程（即 CPU 核心数）下的基准进行了比较。从结果可以看出，EnvPool 在所有设置下都显著优于基准。在高端配置下，EnvPool 在 256 个 CPU 核心上实现了 Atari 环境每秒 100 万帧、Mujoco 环境每秒 300 万帧的吞吐量，分别是 `gym.vector_env` 基准的 14.9 倍和 19.6 倍。而在典型的 12 核 CPU 的 PC 配置下，EnvPool 的吞吐量则是 `gym.vector_env` 的 3.1 倍和 2.9 倍。\n\n|  Atari 最高 FPS   | 笔记本电脑 (12) | 工作站 (32) | TPU-VM (96) | DGX-A100 (256) |\n| :------------------: | :---------: | :--------------: | :---------: | :------------: |\n|       For-loop       |    4,893    |      7,914       |    3,993    |     4,640      |\n|      Subprocess      |   15,863    |      47,699      |   46,910    |     71,943     |\n|    Sample-Factory    |   28,216    |     138,847      |   222,327   |    707,494     |\n|    EnvPool (sync)    |   37,396    |     133,824      |   170,380   |    427,851     |\n|   EnvPool (async)    | **49,439**  |   **200,428**    |   359,559   |    891,286     |\n| EnvPool (numa+async) |      \u002F      |        \u002F         | **373,169** | **1,069,922**  |\n\n|  Mujoco 最高 FPS  | 笔记本电脑 (12) | 工作站 (32) | TPU-VM (96) | DGX-A100 (256) |\n| :------------------: | :---------: | :--------------: | :---------: | :------------: |\n|       For-loop       |   12,861    |      20,298      |   10,474    |     11,569     |\n|      Subprocess      |   36,586    |     105,432      |   87,403    |    163,656     |\n|    Sample-Factory    |   62,510    |     309,264      |   461,515   |   1,573,262    |\n|    EnvPool (sync)    |   66,622    |     380,950      |   296,681   |    949,787     |\n|   EnvPool (async)    | **105,126** |   **582,446**    |   887,540   |   2,363,864    |\n| EnvPool (numa+async) |      \u002F      |        \u002F         | **896,830** | **3,134,287**  |\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsail-sg_envpool_readme_0189bef7b298.png)\n\n\n更多详细信息请参阅 [基准测试](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fbenchmark.html) 页面。\n\n## API 使用\n\n以下内容展示了 EnvPool 的同步和异步 API 使用方法。您也可以运行完整的脚本，地址为 [examples\u002Fenv_step.py](https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fblob\u002Fmain\u002Fexamples\u002Fenv_step.py)。\n\n### 同步 API\n\n```python\nimport envpool\nimport numpy as np\n\n# 创建 gym 环境\nenv = envpool.make(\"Pong-v5\", env_type=\"gym\", num_envs=100)\n# 或者使用 envpool.make_gym(...)\nobs = env.reset()  # 应该是 (100, 4, 84, 84)\nact = np.zeros(100, dtype=int)\nobs, rew, term, trunc, info = env.step(act)\n```\n\n在同步模式下，`envpool` 与 `openai-gym`\u002F`dm-env` 非常相似。它具有与原版相同的 `reset` 和 `step` 函数。不过，`envpool` 有一个例外：默认采用批量交互。因此，在创建 `envpool` 时，需要指定一个 `num_envs` 参数，用于表示您希望同时运行多少个环境。\n\n```python\nenv = envpool.make(\"Pong-v5\", env_type=\"gym\", num_envs=100)\n```\n\n传递给 `step` 函数的 `action` 的第一个维度应等于 `num_envs`。\n\n```python\nact = np.zeros(100, dtype=int)\n```\n\n您无需在某个环境完成时手动重置它；相反，`envpool` 中的所有环境都默认启用了自动重置功能。\n\n### 异步 API\n\n```python\nimport envpool\nimport numpy as np\n\n# 创建异步环境\nnum_envs = 64\nbatch_size = 16\nenv = envpool.make(\"Pong-v5\", env_type=\"gym\", num_envs=num_envs, batch_size=batch_size)\naction_num = env.action_space.n\nenv.async_reset()  # 向所有环境发送初始重置信号\nwhile True:\n    obs, rew, term, trunc, info = env.recv()\n    env_id = info[\"env_id\"]\n    action = np.random.randint(action_num, size=batch_size)\n    env.send(action, env_id)\n```\n\n在异步模式下，`step` 函数被拆分为两个部分：`send` 和 `recv` 函数。`send` 接受两个参数：一批动作以及每个动作对应的 `env_id`，用于指示将动作发送到哪个环境。与 `step` 不同，`send` 不会等待环境执行并返回下一个状态，而是在动作被送入环境后立即返回。（这也是其被称为异步模式的原因）。\n\n```python\nenv.send(action, env_id)\n```\n\n要获取“下一个状态”，我们需要调用 `recv` 函数。然而，`recv` 并不能保证您会收到刚刚调用 `send` 的那些环境的“下一个状态”。相反，最先完成执行的环境会优先被 `recv` 到。\n\n```python\nstate = env.recv()\n```\n\n除了 `num_envs` 之外，还有一个 `batch_size` 参数。虽然 `num_envs` 定义了 `envpool` 总共管理多少个环境，但 `batch_size` 则指定了每次与 `envpool` 交互时涉及的环境数量。例如，如果 `envpool` 中有 64 个环境正在运行，那么每次 `send` 和 `recv` 只会与其中 16 个环境进行交互。\n\n```python\nenvpool.make(\"Pong-v5\", env_type=\"gym\", num_envs=64, batch_size=16)\n```\n\n`envpool.make` 还有其他可配置的参数，请参阅 [EnvPool Python 接口介绍](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fpython_interface.html)。\n\n### 渲染\n\nEnvPool 通过 Python 封装暴露了渲染功能。创建环境时设置 `render_mode=\"rgb_array\"` 可以获取批量的 RGB 输出，或者设置 `render_mode=\"human\"` 通过 OpenCV 显示单个环境。\n\n```python\nimport envpool\n\nenv = envpool.make(\n    \"Ant-v5\",\n    env_type=\"gymnasium\",\n    num_envs=4,\n    render_mode=\"rgb_array\",\n    render_width=480,\n    render_height=480,\n)\nenv.reset()\nframes = env.render(env_ids=[0, 2])\nassert frames.shape == (2, 480, 480, 3)\n```\n\n`render()` 是以批次为先的，因此即使只渲染一个环境，也会保留批次维度：`env.render().shape == (1, H, W, 3)`。如果省略 `env_ids`，EnvPool 会渲染 `render_env_id`（默认为 `0`）。`camera_id` 可以在每次调用时覆盖，而输出尺寸则在创建环境时通过 `render_width` 和 `render_height` 固定。\n\n仓库的测试套件也对渲染功能进行了测试。`make bazel-test` 会对每个支持渲染的环境系列重复进行渲染检查，而 `make release-test` 则包含一个轮子烟雾测试，在 `reset()` 后调用 `render()`。在 Windows 上，MuJoCo 的渲染测试使用了上述相同的 `ENVPOOL_DLL_DIR` Mesa 预加载钩子，以便使用软件 OpenGL 而不是系统驱动程序。\n\n```python\nviewer = envpool.make(\n    \"WalkerWalk-v1\",\n    env_type=\"gymnasium\",\n    num_envs=1,\n    render_mode=\"human\",\n    render_env_id=0,\n)\nviewer.reset()\nviewer.render()\n```\n\n`render_mode=\"human\"` 返回 `None`，并且目前每次调用仅支持一个环境 ID。此外，它还需要安装 `opencv-python`。\n\n### 像素观测\n\n对于 MuJoCo 任务，像素观测也可以通过常规的观测 API 直接暴露出来，只需传递 `from_pixels=True` 即可。这一路径是在 C++ 中原生实现的，无需通过 Python 端的 `render()` 进行路由。\n\n```python\npixels = envpool.make(\n    \"WalkerWalk-v1\",\n    env_type=\"gymnasium\",\n    num_envs=2,\n    from_pixels=True,\n    frame_stack=3,\n    render_width=84,\n    render_height=84,\n)\nobs, info = pixels.reset()\nassert obs.shape == (2, 9, 84, 84)\n```\n\n像素观测采用通道优先的布局。当 `frame_stack=1` 时，每个环境返回 `(3, H, W)`；当 `frame_stack=3` 时，EnvPool 会将帧堆叠到通道维度上，返回 `(9, H, W)`。这直接符合常用的 PyTorch `BCHW` 规范。如果省略 `render_width` 或 `render_height`，EnvPool 会将其默认设置为 `84`。\n\n## 贡献\n\nEnvPool 仍处于开发阶段。未来还将添加更多环境，并且我们始终欢迎贡献，以帮助 EnvPool 不断完善。如果您希望参与贡献，请查看我们的[贡献指南](https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fcontributing.html)。\n\n## 许可证\n\nEnvPool 采用 Apache2 许可证。\n\n其他第三方源代码和数据则遵循各自的许可证。\n\n我们并未将这些第三方的源代码和数据包含在本仓库中。\n\n## 引用 EnvPool\n\n如果您觉得 EnvPool 对您有帮助，请在您的出版物中引用它。\n\n```latex\n@inproceedings{weng2022envpool,\n author = {Weng, Jiayi and Lin, Min and Huang, Shengyi and Liu, Bo and Makoviichuk, Denys and Makoviychuk, Viktor and Liu, Zichen and Song, Yufan and Luo, Ting and Jiang, Yukun and Xu, Zhongwen and Yan, Shuicheng},\n booktitle = {Advances in Neural Information Processing Systems},\n editor = {S. Koyejo and S. Mohamed and A. Agarwal and D. Belgrave and K. Cho and A. Oh},\n pages = {22409--22421},\n publisher = {Curran Associates, Inc.},\n title = {Env{P}ool: A Highly Parallel Reinforcement Learning Environment Execution Engine},\n url = {https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2022\u002Ffile\u002F8caaf08e49ddbad6694fae067442ee21-Paper-Datasets_and_Benchmarks.pdf},\n volume = {35},\n year = {2022}\n}\n```\n\n## 免责声明\n\n本项目并非 Sea Limited 或 Garena Online Private Limited 的官方产品。","# EnvPool 快速上手指南\n\nEnvPool 是一个基于 C++ 的高性能批量环境池，支持多线程并行执行。它兼容 OpenAI `gym`、DeepMind `dm_env` 及 `gymnasium` API，能够显著提升强化学习训练速度（在 Atari 游戏上可达 ~1M FPS，Mujoco 上可达 ~3M FPS）。\n\n## 环境准备\n\n*   **操作系统**：Linux, macOS, Windows\n*   **Python 版本**：3.11 - 3.14\n*   **前置依赖**：\n    *   通过 PyPI 安装时通常无需额外配置（Windows 版 Procgen 已内置所需 Qt 运行库）。\n    *   若需从源码编译或进行高级定制，可能需要安装 Qt 5 及相关构建工具（详见官方文档 Build From Source 章节）。\n\n## 安装步骤\n\n推荐使用 pip 直接安装预编译包：\n\n```bash\npip install envpool\n```\n\n> **提示**：国内用户若下载缓慢，可使用清华或阿里镜像源加速：\n> ```bash\n> pip install envpool -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> ```\n\n安装完成后，可通过以下命令验证是否成功：\n\n```python\nimport envpool\nprint(envpool.__version__)\n```\n若无报错并输出版本号，即表示安装成功。\n\n## 基本使用\n\nEnvPool 默认采用**批量交互**模式，即一次性并行运行多个环境实例。\n\n### 同步模式示例\n\n以下示例展示了如何创建 100 个并行的 Pong 游戏环境并进行一步交互：\n\n```python\nimport envpool\nimport numpy as np\n\n# 创建环境池：指定环境名称、类型及并行数量\nenv = envpool.make(\"Pong-v5\", env_type=\"gym\", num_envs=100)\n\n# 重置所有环境，返回观测值形状为 (100, 4, 84, 84)\nobs = env.reset()\n\n# 构造动作数组，第一维必须等于 num_envs\nact = np.zeros(100, dtype=int)\n\n# 执行一步交互\n# 返回值包含：观测值、奖励、终止标志、截断标志、信息字典\nobs, rew, term, trunc, info = env.step(act)\n```\n\n**关键特性说明：**\n1.  **批量操作**：`step` 和 `reset` 函数自动处理所有并行环境，输入的动作数组第一维需与 `num_envs` 一致。\n2.  **自动重置**：当某个子环境结束时（done=True），EnvPool 会自动将其重置，无需手动干预。\n3.  **API 兼容**：接口设计与标准 `gym` 高度一致，易于集成到 Stable-Baselines3、Tianshou 等现有 RL 库中。","某自动驾驶算法团队正在利用强化学习训练机械臂抓取策略，需要在 Mujoco 仿真环境中快速迭代数百万次交互数据。\n\n### 没有 envpool 时\n- **数据采集瓶颈严重**：使用 Python 原生多进程（Subprocess）并行环境时，进程间通信开销巨大，导致每秒仅能处理约 15 万步仿真，GPU 经常因等待数据而空闲。\n- **资源利用率低下**：在仅有 12 核 CPU 的常规开发机上，传统向量环境吞吐量极低，无法跑满算力，训练一个基准模型耗时数天。\n- **代码适配成本高**：团队原有代码基于 `gym` 接口编写，若要尝试更高效的 C++ 后端或异步执行模式，需重构大量底层交互逻辑。\n- **调试与扩展困难**：当需要自定义新的物理环境或支持多人博弈场景时，Python 层的性能损耗使得调试周期漫长且难以定位并发问题。\n\n### 使用 envpool 后\n- **吞吐量爆发式增长**：借助 envpool 的 C++ 线程池与批量化 API，同一台 12 核机器上的仿真速度提升约 3 倍，在高性能集群上更是实现了每秒 300 万步的极致吞吐。\n- **硬件算力充分释放**：极低的通信延迟让 GPU 不再“等米下锅”，数据生成速度完全匹配模型训练需求，整体训练周期从数天缩短至数小时。\n- **无缝平滑迁移**：envpool 完美兼容现有的 `gym` 和 `dm_env` 接口，团队无需修改上层强化学习算法代码，仅需替换环境初始化行即可享受加速红利。\n- **灵活支持复杂场景**：轻松切换同步\u002F异步模式以适配不同算法需求，并利用其便捷的 C++ 开发接口快速集成了定制化的多智能体协作环境。\n\nenvpool 通过底层 C++ 引擎消除了 Python 并行瓶颈，将强化学习的数据生产效率提升了数量级，让算法迭代真正跟上算力的步伐。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsail-sg_envpool_0189bef7.png","sail-sg","Sea AI Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fsail-sg_c01d6e2a.png","",null,"https:\u002F\u002Fsail.sea.com","https:\u002F\u002Fgithub.com\u002Fsail-sg",[84,88,92,96,100,104,107],{"name":85,"color":86,"percentage":87},"C++","#f34b7d",61.9,{"name":89,"color":90,"percentage":91},"Python","#3572A5",32.6,{"name":93,"color":94,"percentage":95},"Starlark","#76d275",4.7,{"name":97,"color":98,"percentage":99},"Makefile","#427819",0.6,{"name":101,"color":102,"percentage":103},"Dockerfile","#384d54",0.1,{"name":105,"color":106,"percentage":103},"C","#555555",{"name":108,"color":109,"percentage":110},"Shell","#89e051",0,1310,128,"2026-04-06T20:09:00","Apache-2.0","Linux, macOS, Windows","非必需。该工具主要基于 CPU 并行化（使用线程池），在基准测试中使用了多达 256 个 CPU 核心。虽然支持与 JAX (XLA) 集成，但核心运行不依赖特定 GPU 型号、显存或 CUDA 版本。","未说明（性能主要取决于 CPU 核心数量，基准测试覆盖了从 12 核到 256 核的配置）",{"notes":119,"python":120,"dependencies":121},"1. PyPI 预编译包在运行时不需要单独安装 Qt。2. Windows 上若需从源码构建或使用 MuJoCo 渲染，可能需要配置 Mesa OpenGL 软件渲染或安装 Qt 5。3. 该工具通过 C++ 和线程池实现高性能并行，旨在替代基于 Python 子进程的向量化环境，特别适用于多核 CPU 服务器。4. 支持同步和异步模式，默认启用自动重置功能。","3.11-3.14",[122,123,124,125,126,127],"pybind11","gym","dm_env","gymnasium","numpy","Qt 5 (仅源代码编译或特定环境如 Procgen\u002FWindows 需要)",[18],[130,131,132,122,133,134,135,136,123,137,138,139,140,141,142,143],"reinforcement-learning","parallel-processing","cpp17","reinforcement-learning-environments","threadpool","atari-games","vizdoom","high-performance-computing","lock-free-queue","mujoco","box2d","dm-control","robotics","dm-env","2026-03-27T02:49:30.150509","2026-04-07T13:28:54.278641",[147,152,157,162,167,171],{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},22079,"为什么从源码安装后 `envpool.list_all_envs()` 返回空列表，且无法创建环境？","这是因为在旧版本（如 0.8.4）中，使用开发环境构建的 wheel 可能包含特定于主机的 Linux\u002Fglibc 假设，导致导入时的注册失败。解决方案如下：\n1. 推荐使用 PyPI 发布的预编译包：直接运行 `pip install envpool`（适用于 v1.0.0 及以上版本）。\n2. 如果必须从源码构建可分发的 Linux wheel，请使用发布路径或 manylinux 容器（例如 `docker\u002Frelease.dockerfile`、`make docker-release-launch` 或 `make pypi-wheel`），而不要使用旨在本地开发的 `docker-dev`。\n3. 确保升级到 v1.0.0 或更高版本，该版本已在 `manylinux_2_28` 环境中构建并发布了对 Python 3.11-3.13 的支持。","https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fissues\u002F287",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},22080,"运行 `pip install envpool` 时提示 \"ERROR: No matching distribution found\" 怎么办？","这通常是因为您的 Python 版本或操作系统架构不在当前支持范围内。自 envpool 1.0.0（2026 年 3 月 27 日发布）起，`pip install envpool` 仅支持以下环境：\n- Python 版本：3.11, 3.12, 3.13\n- 平台架构：Linux x86_64, macOS arm64, Windows AMD64\n如果您使用的是较旧的 Python 版本（如 3.7-3.10）或不支持的架构，将无法找到匹配的分发包。请升级 Python 到受支持版本，或检查系统架构是否符合要求。如果确认环境符合要求仍报错，请提供 `python --version`, `pip --version`, `uname -a` 及完整安装日志以便进一步排查。","https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fissues\u002F189",{"id":158,"question_zh":159,"answer_zh":160,"source_url":161},22081,"EnvPool 的自动重置（auto-reset）行为与 openai\u002Fbaselines 或旧版 Gym API 不兼容吗？","是的，存在行为差异，但这并非 Bug，而是设计选择。\n- 旧版 Gym\u002FBaselines：当环境结束时（done=True），会在同一步骤立即重置并返回新 episode 的初始观测值，终止观测值放在 `info` 字典中。\n- EnvPool：采用“下一步重置”语义。当环境结束时，重置操作发生在下一次调用 `step()` 时。\n维护者明确表示不会添加对旧版同一步骤重置的兼容性支持。此外，自 Gymnasium v1.0.0 起，其向量环境的自动重置语义已更改为与 EnvPool 一致，因此在新版 Gymnasium 中不再存在此不匹配问题。","https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fissues\u002F194",{"id":163,"question_zh":164,"answer_zh":165,"source_url":166},22082,"EnvPool 和 Gym 在自动重置时的具体步骤差异是什么？","两者的主要差异在于重置发生的时机：\n- **Gym (旧版行为)**：当 `terminated=true` 时，环境在同一时刻立即重置。例如，执行动作导致结束后，返回的观测值已经是新 episode 的初始状态。\n- **EnvPool**：当 `terminated=true` 时，环境不会立即重置。需要再调用一次 `step()`（此时传入的动作会被丢弃），才会执行重置并返回新 episode 的初始观测值。\n这意味着在使用 EnvPool 时，如果在 done 为 True 后立即依赖下一个观测值进行逻辑判断（如 LSTM 隐藏状态更新），需要注意这个时间差，或者适配代码逻辑以符合 EnvPool 的“下一步重置”机制。","https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fissues\u002F257",{"id":168,"question_zh":169,"answer_zh":170,"source_url":151},22083,"Python 3.12 用户目前如何安装 EnvPool？","对于 Python 3.12 用户，请直接使用 PyPI 安装。自 v1.0.0 版本发布以来，官方已提供针对 Python 3.11、3.12 和 3.13 的预编译 wheel 包。只需运行以下命令即可：\n```bash\npip install envpool\n```\n无需再从源码编译，除非您需要特定的开发版本。如果从源码编译遇到问题，请确保使用了正确的 manylinux 容器进行构建。",{"id":172,"question_zh":173,"answer_zh":174,"source_url":156},22084,"macOS ARM64 (M1\u002FM2) 用户可以安装 EnvPool 吗？","可以。自 envpool 1.0.0 版本起，官方已发布支持 macOS arm64 架构的 wheel 包。只要您的 Python 版本在支持列表内（3.11, 3.12, 或 3.13），即可直接通过 pip 安装：\n```bash\npip install envpool\n```\n维护者已在本地验证过 macOS arm64 + Python 3.12 的清洁安装。如果您仍遇到安装问题，请检查您的 pip 版本是否过旧，或尝试升级 pip。",[176,181,186,191,196,201,206,210,215,220,225,230,235,240,245,250,255,260,265,270],{"id":177,"version":178,"summary_zh":179,"released_at":180},135759,"v1.1.0","## 变更内容\n* [envpool] 添加覆盖率报告和 GitHub Pages 发布功能，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F368 中完成\n* 加强渲染覆盖率和发布验证，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F369 中完成\n* [atari] 修复 frame_skip=1 时的最大池化伪影问题，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F370 中完成\n* [minigrid] 添加 BabyAI C++ 任务并拆分绑定，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F371 中完成\n* [envpool] 移除 gym 依赖，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F373 中完成\n* [procgen] 添加探索模式和 oracle 覆盖率，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F374 中完成\n* [minigrid] 添加 WFC 环境，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F376 中完成\n* [envpool] 添加 Gymnasium 命名空间别名，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F375 中完成\n* [mujoco] 添加原生 C++ 版 Gymnasium-Robotics 套件，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F377 中完成\n* [envpool] 将 Gymnasium-Robotics 资产纳入发布轮子包，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F378 中完成\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fcompare\u002Fv1.0.1...v1.1.0","2026-04-04T16:34:34",{"id":182,"version":183,"summary_zh":184,"released_at":185},135760,"v1.0.1","## 变更内容\n* [envpool] 修复 Bazel 构建和测试徽章的 URL，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F360 中完成\n* [envpool] 添加共享线程池支持，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F361 中完成\n* [envpool] 使官方环境与 Gymnasium 的一致性对齐，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F362 中完成\n* [ci] 增加 Linux ARM64 测试覆盖率，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F363 中完成\n* [vizdoom] 移除旧版 glibc 版本头文件的 hack 代码，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F364 中完成\n* [envpool] 导出类型化的公共接口，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F365 中完成\n* [envpool] 在所有环境系列中添加批处理渲染支持，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F366 中完成\n* [envpool] 添加 Python 3.14 发布目标，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F367 中完成\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fcompare\u002Fv1.0.0...v1.0.1","2026-03-31T16:21:38",{"id":187,"version":188,"summary_zh":189,"released_at":190},135761,"v1.0.0","## 变更内容\n* 将 clang-tidy 的作用范围限定为 C++ 目标，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F355 中完成\n* 添加对非 BabyAI 的 MiniGrid 环境的完整支持，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F356 中完成\n* [ci] 恢复 GitHub 托管的测试工作流及 Bazel 缓存复用功能，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F357 中完成\n* [envpool] 添加 macOS 平台的安装、测试及 wheel 包支持，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F358 中完成\n* [envpool] 使 Windows CI 与测试和发布工作流保持一致，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F359 中完成\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fcompare\u002Fv0.9.1...v1.0.0","2026-03-27T22:06:51",{"id":192,"version":193,"summary_zh":194,"released_at":195},135762,"v0.9.1","## 变更内容\n* [envpool] 将 XLA 自定义调用迁移到 OpenXLA FFI，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F343 中完成\n* [envpool] 修复 Atari 和 Vizdoom 的显式分幕生命重置问题，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F344 中完成\n* [envpool] 自动注册 minigrid 环境，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F345 中完成\n* [envpool] 将 .bazelversion 同步至 Bazel 8.6.0，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F346 中完成\n* [envpool] 修复多人模式中 players.env_id 的推断问题，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F347 中完成\n* [examples] 在截断时重置 CleanRL Atari 统计数据，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F348 中完成\n* [envpool] 支持每个环境的种子序列，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F349 中完成\n* [vizdoom] 将组合后的 dm 动作暴露为离散动作，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F350 中完成\n* [mujoco] 支持在所有 gym 环境中覆盖 xml_file，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F351 中完成\n* [mujoco] 在 Linux 上从源码构建 MuJoCo，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F352 中完成\n* [atari] 在 step 信息中暴露 RAM 数据，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F353 中完成\n* [docs] 添加 Read the Docs C++ API 参考文档，由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F354 中完成\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fcompare\u002Fv0.9.0...v0.9.1","2026-03-24T18:06:03",{"id":197,"version":198,"summary_zh":199,"released_at":200},135763,"v0.9.0","## 变更内容\n* 优化 `Index` 模板的实现，以提升构建速度。由 @lanchihi 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F326 中完成。\n* [envpool] 修复灵活的 lint 工具链漂移问题。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F329 中完成。\n* [envpool] 修复 Linux 测试工作流的兼容性问题。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F330 中完成。\n* [envpool] 将测试环境升级到 Python 3.12 和 MuJoCo 3.x。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F333 中完成。\n* [envpool] 升级直接依赖项并移除过时的镜像源。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F334 中完成。\n* [envpool] 完成第一阶段的原生依赖项升级。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F335 中完成。\n* [envpool] 将 JAX 升级至 0.9 版本，并强化状态缓冲区的回退机制。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F336 中完成。\n* [envpool] 现代化基准测试栈，并切换 procgen 的上游源。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F337 中完成。\n* [envpool] 升级 Bazel 8 工具链，并发布构建基础设施。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F338 中完成。\n* [envpool] 稳定 manylinux 发布轮的构建流程。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F339 中完成。\n* [envpool] 清理开发环境中的 Python 依赖项，并稳定状态缓冲区。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F340 中完成。\n* [envpool] 将 Bazel 的 Qt 规则迁移到项目树内。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F341 中完成。\n* 统一 Ruff 配置，并启用 docstring 规则。由 @Trinkle23897 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F342 中完成。\n\n## 新贡献者\n* @lanchihi 在 https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fpull\u002F326 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsail-sg\u002Fenvpool\u002Fcompare\u002Fv0.8.4...v0.9.0","2026-03-23T06:25:49",{"id":202,"version":203,"summary_zh":204,"released_at":205},135764,"v0.8.4","- 修复 JAX 最新版本的兼容性问题 (#282, @ethanluoyc)\n- 修复 CUDA 流同步问题 (#284, @mavenlin)\n- 修复 CI 并升级依赖 (#285, #286, @Trinkle23897)","2023-10-30T19:30:21",{"id":207,"version":208,"summary_zh":80,"released_at":209},135765,"v0.8.3","2023-09-07T05:15:38",{"id":211,"version":212,"summary_zh":213,"released_at":214},135766,"v0.8.2","[免责声明：由 ChatGPT API 生成]\n\n🚨 各位贡献者，大家好！ 🚨\n\n今天是个值得庆祝的日子，因为我们为 sail-sg\u002Fenvpool 做出了许多开源贡献！在过去的 78 天里，我们合并了一些值得关注的更改，在此与大家分享。以下是这些更改的概览：\n\n🔧 PR #237 [MiniGrid 空环境] @wangsiping97：\n将 MiniGrid 的 EmptyEnv 移植到 envpool 中。\n\n🔧 PR #238 [懒加载] @Trinkle23897：\n现在执行 `import envpool` 不再会因 procgen 的 Qt5 依赖而报错，这使得新搭建的开发环境更加便捷。\n\n🔧 PR #242 [杂项：更新 dev-cn Dockerfile] @Benjamin-eecs：\n加快了依赖安装速度，让开发过程更高效。\n\n🔧 PR #243 [在示例中使用新的 Gym API] @leninilyich：\n之前环境返回五个值，导致无法正确解包出 “done” 标志。该问题现已修复，功能恢复正常。\n\n🐛 PR #245 [修正 CarpoletSwingup 中的拼写错误] @vwxyzjn：\n修正了 CarpoletSwingup 环境中的一个小拼写错误。\n\n🔧 PR #248 [杂项：为 pip 安装添加超时标志] @Benjamin-eecs：\n为 pip 安装增加了更长的超时时间，这对于国内用户尤其有帮助。\n\n🚀 PR #249 [修复（hansbug）：使用 treevalue 1.4.7] @HansBug：\n此前 PR #246 存在一个 bug，现已通过将 treevalue 版本升级至 1.4.7 得到修复。\n\n🚀 PR #247 [依赖项：用 optree 替代 treevalue] @Benjamin-eecs @XuehaiPan：\n我们用 optree 替代了 treevalue，以提升速度并支持自定义节点类型的注册。这一改动引入了一项新功能，同时属于非破坏性变更，增强了核心功能。\n\n🔧 PR #252 [修复 CI 发布中的 ‘packaging not found’ 问题，并调整 MiniGrid 的确定性测试] @Trinkle23897：\n该 PR 修复了打包相关的问题，并对 MiniGrid 的确定性测试进行了调整，从而带来更稳定的性能。\n\n🐛 PR #254 [修复旧版 Gym 返回类型错误] @Trinkle23897：\n该 PR 修复了由 PR #247 引入的一个 bug。\n\n🐛 PR #255 [修复 Atari 在 episodic_life=True 时 trunc 标志不正确的问题] @Trinkle23897：\n针对 Atari 环境在 episodic_life=True 情况下 trunc 标志错误的问题，现已得到修复。\n\n以上每一条 PR 都为我们代码库做出了重要贡献。我们鼓励大家查看这些更改，体验新增和修复的功能。一如既往地感谢大家的支持，期待未来能继续与各位携手共进！\n\n感谢所有做出贡献的小伙伴！","2023-03-28T06:24:24",{"id":216,"version":217,"summary_zh":218,"released_at":219},135767,"v0.8.1","# 增强功能\n\n- 在 procgen 环境中添加 `channel_first` 选项，将默认的观测形状由 `(64, 64, 3)` 改为 `(3, 64, 64)` (#232, @Trinkle23897)","2023-01-08T04:52:49",{"id":221,"version":222,"summary_zh":223,"released_at":224},135768,"v0.8.0","# 新环境\n\n添加 42 个 procgen 环境 (#197, @YukunJ, @LeoGuo98, @Trinkle23897)\n\nprocgen 库的变更见 https:\u002F\u002Fgithub.com\u002FTrinkle23897\u002Fprocgen：\n- 修复 Qt 库的包含错误\n- 通过添加另一个显式的 make_* 函数，修复 globalGameRegistry == nullptr 的问题（感谢 Yukun！）\n- 禁用自动重置，因为 envpool 已经处理了该功能\n\n变更：\n- 添加新的依赖 `qtdeclarative5-dev`，并重新构建 Docker 镜像\n- 更新 PyPI 轮子包，从 manylinux_2_17_x86_64 升级到 manylinux_2_24_x86_64，以解决 libstdc++.so.6 符号问题\n- 添加 42 个 procgen 环境\n- 重构 `base_path`\n- 文档：https:\u002F\u002Fenvpool.readthedocs.io\u002Fen\u002Flatest\u002Fenv\u002Fprocgen.html\n\n# 增强功能\n\n- 支持 Atari 完整动作空间 (#230, @Trinkle23897)","2023-01-03T05:58:01",{"id":226,"version":227,"summary_zh":228,"released_at":229},135769,"v0.7.0","最后，Gym 中的所有环境都已迁移到 EnvPool！您可以完全弃用 Box2D、box2d-py 和 mujoco_py 这些 PyPI 包。\n\n# 新环境\n\n1. CarRacing-v2 (#199，@Alicia1529)\n\n# 增强功能\n\n1. 在 Atari 环境中添加 `use_fire_reset` 选项 (#223，@Trinkle23897)\n2. 在 Humanoid-v3 中恢复接触力计算 (#224，@Trinkle23897)\n3. 集成 Gymnasium 库 (#222，@Markus28)\n4. 基础设施改进：单元测试采用 Ubuntu 22.04 + Python 3.10，并新增 Python 3.11 的 Wheel 发布包 (#228，@Trinkle23897)\n5. 升级依赖项并修复 clang-tidy 报错 (#229，@Trinkle23897)","2022-12-29T21:19:41",{"id":231,"version":232,"summary_zh":233,"released_at":234},135770,"v0.6.6","# Speed Improvement\r\n\r\n1. replace dm-tree with treevalue (#206, @wangsiping97, dmc 6k->8k FPS)\r\n2. move python computation logic into c++ (#208, @wangsiping97, dmc 8k->11k FPS)\r\n3. cache c++ object read result (#209, @wangsiping97, dmc 11k->14k FPS)\r\n4. improve gym speedup (#210, @wangsiping97, gym 11k->14k FPS)\r\n\r\nNow we are truly faster than dm_control!\r\n\r\n# Enhancement\r\n\r\n1. upgrade examples to support gym >= 0.26 (#215, @51616)\r\n3. update demo links in README (#212, @Benjamin-eecs)\r\n4. better arugment checking in python side init (#217, @Trinkle23897)\r\n6. refactor some tests (#210, @Trinkle23897)\r\n1. fix gym action space seed behavior error (#211, @Trinkle23897)","2022-11-01T04:14:23",{"id":236,"version":237,"summary_zh":238,"released_at":239},135771,"v0.6.5","# Enhancement\r\n\r\n1. Box2D integration: Add BipedalWalker, BipedalWalkerHardcore (#131, @Alicia1529)\r\n2. Support Gym 0.26.0 (#205, @Markus28)\r\n3. Add demo notebook (#202, @Benjamin-eecs)","2022-10-18T05:37:47",{"id":241,"version":242,"summary_zh":243,"released_at":244},135772,"v0.6.4","# Enhancement\r\n\r\n1. Fix Atari env elapsed_step error when episodic_life is True (#181, @Trinkle23897)\r\n2. Upgrade mujoco to 2.2.1 (#183, @Trinkle23897)\r\n3. Add Python 3.10 Wheel and update documentation (#187, @Trinkle23897)","2022-08-15T04:41:03",{"id":246,"version":247,"summary_zh":248,"released_at":249},135773,"v0.6.3","# Bug Fix\r\n\r\n1. Fix import error with gym==0.25.0 (#167, @Trinkle23897)\r\n2. Fix zero-life reset error in Atari env (#175, @Trinkle23897)\r\n\r\n# Enhancement\r\n\r\n1. Refactor the XLA code to simplify it and at the same time include GPU code (#165, @mavenlin)\r\n2. Add acme example (#157, @lkevinzc)\r\n3. Add colab demo (#159, @Benjamin-eecs)","2022-07-25T05:29:39",{"id":251,"version":252,"summary_zh":253,"released_at":254},135774,"v0.6.2","# Bug Fix\r\n\r\n1. Fix action ref counting error (#154, @Trinkle23897)\r\n\r\n# New Env\r\n\r\n1. dm_control humanoid_CMU (#145, @Benjamin-eecs)\r\n\r\n# Enhancement\r\n\r\n1. XLA CustomCall interface, now we can use `jax.jit` on EnvPool (#149, @mavenlin)\r\n2. Remove Atari wrong bin (#147, @Trinkle23897)\r\n3. Add dm_control speed test script and single env performance benchmark (#139, @Trinkle23897)\r\n4. Upgrade mujoco to 2.2.0 (#142, @Trinkle23897)","2022-06-15T16:02:07",{"id":256,"version":257,"summary_zh":258,"released_at":259},135775,"v0.6.1","Note: Compared with dm_control, EnvPool can have at about 2x free speedup with only single environment setting (#139, @Trinkle23897). For the next release, we are going to use mujoco source code (#141, @Trinkle23897) to make everything faster!\r\n\r\n# New dm_control Env\r\n\r\n1. Humanoid (#132, @Benjamin-eecs)\r\n2. Manipulator (#128, @yufansong, @Trinkle23897)\r\n3. Fish (#134, @Benjamin-eecs)\r\n4. CartPole (#137, @Benjamin-eecs)\r\n5. Swimmer (#140, @Benjamin-eecs)\r\n6. Misc (#138, @Trinkle23897)","2022-05-24T00:38:33",{"id":261,"version":262,"summary_zh":263,"released_at":264},135776,"v0.6.0","Note: we are still in the progress of adding more environment from dm_control suite and box2d.\r\n\r\n# New Environment\r\n\r\n## DeepMind Control Suite\r\n\r\n1. Hopper (#107, @Trinkle23897)\r\n2. Cheetah (#110, @yufansong)\r\n3. Walker (#114, @yufansong)\r\n4. Reacher (#115, @yufansong)\r\n5. Finger (#118, @yufansong)\r\n6. Pendulum (#122, @yufansong)\r\n7. BallInCup (#124, @Benjamin-eecs)\r\n8. PointMass (#123, @yufansong)\r\n9. Acrobot (#129, @Benjamin-eecs)\r\n10. Misc (#106, #125, #130, @Trinkle23897)\r\n\r\n## Box2D\r\n\r\n1. LunarLander-v2, LunarLanderContinuous-v2 (#111, @Alicia1529)\r\n\r\n## Others\r\n\r\n1. Pendulum-v1 (#126, @Trinkle23897)\r\n\r\n# Bug Fix\r\n\r\n1. Fix episodic_life bug in atari env (#121, @Trinkle23897)\r\n\r\n# Enhancemt\r\n\r\n1. Support dynamic shaped arrays (#98, @mavenlin)\r\n2. Update Mujoco benchmark result (#99, @Trinkle23897)\r\n3. Fix code linter (#109, #116, #117, @Trinkle23897)","2022-05-18T15:42:37",{"id":266,"version":267,"summary_zh":268,"released_at":269},135777,"v0.5.3","This release is for a stable version for benchmarking. We will update the benchmark result for both Atari (Pong-v5) and Mujoco (Ant-v3) soon. We observe Ant-v3 can achieve 2M+ FPS with a 192-core machine.\r\n\r\n# Enhancement\r\n\r\n1. Add `gym_reset_return_info` option for returning `(obs, info)` in `gym.Env.reset` (#97)\r\n2. Add clang-tidy check (#85, #95, #100)","2022-05-02T20:33:56",{"id":271,"version":272,"summary_zh":273,"released_at":274},135778,"v0.5.2","# Bug Fix\r\n\r\n1. Fix max_episode_steps for Pusher and Reacher (#93)\r\n\r\n# Enhancement\r\n\r\n1. add testing macro `ENVPOOL_TEST` (#93, #94)\r\n2. add `terminate_when_unhealthy` and `exclude_current_positions_from_observation` for most of mujoco envs (#93)\r\n3. eliminate `info[\"qpos0\"]` and `info[\"qvel0\"]` in mujoco env when generating wheel (#93)\r\n4. add instructions for building this project with mainland China users (#92)","2022-04-30T17:38:00"]