Gymnasium
12,806
Stars
1,537
Forks
66
Watchers
144
Open Issues
MIT
许可证
Python
语言
2022-09-08
创建时间
2026-11-11
最近更新
项目能做什么
单智能体强化学习环境的标准 API,内置常见参考环境与实用工具(原 Gym)。
来源:AI 基于仓库事实生成
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
[](https://badge.fury.io/py/gymnasium)
[](https://badge.fury.io/py/gymnasium)
[](https://arxiv.org/abs/2407.17032)
[](https://pre-commit.com/)
[](https://github.com/Farama-Foundation/Gymnasium/blob/main/LICENSE)
[](https://github.com/psf/black)
<p align="center">
<a href="https://gymnasium.farama.org/" target = "_blank">
<img src="https://raw.githubusercontent.com/Farama-Foundation/Gymnasium/main/gymnasium-text.png" width="500px" />
</a>
</p>
Gymnasium is an open source Python library for developing and comparing reinforcement learning algorithms by providing a standard API to communicate between learning algorithms and environments, as well as a standard set of environments compliant with that API. This is a fork of OpenAI's [Gym](https://github.com/openai/gym) library by its maintainers (OpenAI handed over maintenance a few years ago to an outside team), and is where future maintenance will occur going forward.
The documentation website is at [gymnasium.farama.org](https://gymnasium.farama.org), and we have a public discord server (which we also use to coordinate development work) that you can join here: https://discord.gg/bnJ6kubTg6
## Environments
Gymnasium includes the following families of environments along with a wide variety of third-party environments
* [Classic Control](https://gymnasium.farama.org/environments/classic_control/) - These are classic reinforcement learning based on real-world problems and physics.
* [Box2D](https://gymnasium.farama.org/environments/box2d/) - These environments all involve toy games based around physics control, using box2d based physics and PyGame-based rendering
* [Toy Text](https://gymnasium.farama.org/environments/toy_text/) - These environments are designed to be extremely simple, with small discrete state and action spaces, and hence easy to learn. As a result, they are suitable for debugging implementations of reinforcement learning algorithms.
* [MuJoCo](https://gymnasium.farama.org/environments/mujoco/) - A physics engine based environments with multi-joint control which are more complex than the Box2D environments.
* [Atari](https://ale.farama.org/) - Emulator of Atari 2600 ROMs simulated that have a high range of complexity for agents to learn.
* [Third-party](https://gymnasium.farama.org/environments/third_party_environments/) - A number of environments have been created that are compatible with the Gymnasium API. Be aware of the version that the software was created for and use the `apply_env_compatibility` in `gymnasium.make` if necessary.
## In
阅读完整原文
商业机会分析 AI 生成
Gym-Finance: 开箱即用的量化交易高频回测与 RL 训练环境
| 产品构想 | 基于 Gymnasium 标准 API 构建专为量化交易设计的撮合与市场回测环境,支持订单簿(L2/L3)回放、交易摩擦模拟及常用因子奖励函数封装。 |
| 核心功能 | 兼容 Gymnasium API 的交易环境包装器;纳秒/微秒级撮合回测支持;多币种/股票真实滑点与手续费建模;开箱即用的技术指标与奖励函数库。 |
| 目标用户 | 量化对冲基金研究员、加密货币量化团队、个人算法交易者。 |
| 难度/周期 | 中等 · 1 - 2 个月 · 成本:月均服务器与高频历史数据采购成本约 $100 - $300 |
| 收费模式 | 核心开源 + 增值数据源订阅(优质清洗行情数据)或高级量化策略环境商业授权(月费/年费)。 |
| 竞争风险 | 量化用户对数据真实度和回测准确性极其敏感,出现仿真偏差(过拟合)易导致客户流失。 |
| 依据 | 已验证事实(Gymnasium API 广泛用于金融 RL 实验,但官方仅提供基础控制环境)。 |
GymStudio: 强化学习仿真可视化与策略诊断平台
| 产品构想 | 针对 Gymnasium 训练过程黑盒化的问题,提供轻量级 Web 可视化工具,支持多环境实例渲染、轨迹动作回放、奖励贡献度分析及异常终止(truncated/terminated)诊断。 |
| 核心功能 | 一键注入 Gymnasium 环境的 Wrapper SDK;云端/本地 Web 监控看板;3D/2D 仿真画面多路推流与录制;单 Step 状态/动作分布热力图及异常策略标记。 |
| 目标用户 | 高校科研人员、具身智能初创团队、游戏 AI 开发者。 |
| 难度/周期 | 中等 · 2 - 3 个月 · 成本:前端与云存储资源月均约 $50 - $150 |
| 收费模式 | 免费开源本地版(推测),云端多人协同与大容量回放轨迹存储采用 SaaS 订阅制($19 - $99/月)。 |
| 竞争风险 | 需与现有的 TensorBoard、Wandb 等主流 MLOps 监控生态打出差异化(聚焦于 Step-level 空间回放与物理仿真诊断)。 |
| 依据 | 数据支持的判断(RL 调试极其困难,Wandb 等通用工具对 Step 级别交互状态和动作空间缺乏针对性支持)。 |
Serverless Gym: 云端分布式 Gymnasium 仿真与基准测试服务
| 产品构想 | 解决 Atari、MuJoCo 等环境在不同操作系统和集群环境配置复杂、资源开销大的痛点,提供按需弹性的 Gymnasium 环境 API 托管与评估服务。 |
| 核心功能 | 预配置全部复杂依赖的云端沙盒环境;RESTful/gRPC Step 级高效调用或批量轨迹生成服务;策略基准打分与防作弊排行榜生成系统。 |
| 目标用户 | 算法评测团队、算力受限的学生及独立开发者、需要标准化 Leaderboard 的竞赛组织方。 |
| 难度/周期 | 较高 · 3 - 4 个月 · 成本:初期服务器集群与网络带宽月均约 $300 - $800 |
| 收费模式 | 按 Step 数量或仿真节点时长计费(API Token 模式);企业私有评测环境部署服务。 |
| 竞争风险 | 网络延迟(step/reset API 的网络开销)可能限制高吞吐 RL 训练,主要场景更适用于评测与异步经验采集(推测)。 |
| 依据 | AI推测 |
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| public-apis/public-apis | 中文介绍暂未生成 A collective list of free APIs |
498,177 | Python |
| open-webui/open-webui | 中文介绍暂未生成 User-friendly AI Interface (Supports Ollama, OpenAI API, ... |
158,394 | Svelte |
| Comfy-Org/ComfyUI | 中文介绍暂未生成 The most powerful and modular diffusion model GUI, api and b |
146,349 | Python |
| earendil-works/pi | 中文介绍暂未生成 AI agent toolkit: unified LLM API, agent loop, TUI, coding a |
121,441 | TypeScript |
| browser-use/browser-use | 中文介绍暂未生成 Open-source Python library for AI browser agents, plus Brows |
120,724 | Python |
| Panniantong/Agent-Reach | 中文介绍暂未生成 Give your AI agent eyes to see the entire internet. Read & s |
111,093 | Python |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 2022-09-08,近 30 天仍在推送,发布过 21 个 Release |
| 社区活跃 | Star 12,806 / Fork 1,537 / Issue 144(数据支持,可自行核实) |
| 许可证 | MIT |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
快速开始(以仓库 README 为准)
git clone https://github.com/Farama-Foundation/Gymnasium.git cd Gymnasium # 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。