[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
## Important Notice
### The team that has been maintaining Gym since 2021 has moved all future development to [Gymnasium](https://github.com/Farama-Foundation/Gymnasium), a drop in replacement for Gym (import gymnasium as gym), and Gym will not be receiving any future updates. Please switch over to Gymnasium as soon as you're able to do so. If you'd like to read more about the story behind this switch, please check out [this blog post](https://farama.org/Announcing-The-Farama-Foundation).
## Gym
Gym 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. Since its release, Gym's API has become the field standard for doing this.
Gym documentation website is at [https://www.gymlibrary.dev/](https://www.gymlibrary.dev/), and you can propose fixes and changes to it [here](https://github.com/Farama-Foundation/gym-docs).
Gym also has a discord server for development purposes that you can join here: https://discord.gg/nHg2JRN489
## Installation
To install the base Gym library, use `pip install gym`.
This does not include dependencies for all families of environments (there's a massive number, and some can be problematic to install on certain systems). You can install these dependencies for one family like `pip install gym[atari]` or use `pip install gym[all]` to install all dependencies.
We support Python 3.7, 3.8, 3.9 and 3.10 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.
## API
The Gym API's API models environments as simple Python `env` classes. Creating environment instances and interacting with them is very simple- here's an example using the "CartPole-v1" environment:
```python
import gym
env = gym.make("CartPole-v1")
observation, info = env.reset(seed=42)
for _ in range(1000):
action = env.action_space.sample()
observation, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
observation, info = env.reset()
env.close()
```
## Notable Related Libraries
Please note that this is an incomplete list, and just includes libraries that the maintainers most commonly point newcommers to when asked for recommendations.
* [CleanRL](https://github.com/vwxyzjn/cleanrl) is a learning library based on the Gym API. It is designed to cater to newer people in the field and provides very good reference implementations.
* [Tianshou](https://github.com/thu-ml/tianshou) is a learning library that's geared towards very experienced users and is design to allow for ease in complex algorithm modifications.
* [RLlib](https://docs.ray.io/en/latest/rllib/index.html) is a learning library that allows for distributed training and inferencing and supports an extraordinarily large number of features throughout the reinforcement learning space.
* [PettingZoo](https://github.com/Farama-Foundation/PettingZoo) is like Gym, but for environments with multiple agents.
## Environment Versioning
Gym keeps strict versioning for reproducibility reasons. All environments end in a suffix like "\_v0". When changes are made to environments that might impact learning results, the number is increased by one to prevent potential confusion.
## MuJoCo Environments
The latest "\_v4" and future versions of the MuJoCo environments will no longer depend on `mujoco-py`. Instead `mujoco` will be the required dependency for future gym MuJoCo environment versions. Old gym MuJoCo environment versions that depend on `mujoco-py` will still be kept but unmaintained.
To install the dependencies for the latest gym MuJoCo environments use `pip install gym[mujoco]`. Dependencies for old MuJoCo environments can still be installed by `pip install gym[mujoco_py]`.
## Citation
A whitepaper from when Gym just came out is available https://arxiv.org/pdf/1606.01540, and can be cited with the following bibtex entry:
```
@misc{1606.01540,
Author = {Greg Brockman and Vicki Cheung and Ludwig Pettersson and Jonas Schneider and John Schulman and Jie Tang and Wojciech Zaremba},
Title = {OpenAI Gym},
Year = {2016},
Eprint = {arXiv:1606.01540},
}
```
## Release Notes
There used to be release notes for all the new Gym versions here. New release notes are being moved to [releases page](https://github.com/openai/gym/releases) on GitHub, like most other libraries do. Old notes can be viewed [here](https://github.com/openai/gym/blob/31be35ecd460f670f0c4b653a14c9996b7facc6c/README.rst).
没有合适的资源?快使用搜索试试~ 我知道了~
OpenAI Gym 是一个用于开发和比较强化学习算法的工具包.zip
共303个文件
py:187个
png:82个
xml:12个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 78 浏览量
2024-05-15
11:36:30
上传
评论
收藏 908KB ZIP 举报
温馨提示
openai 基本原理 基本原理是,通过深度学习算法,将大量的文本内容输入模型中进行训练,模型会自动学习语言的结构规律,从而可以生成高质量的文本。 产品定位 在 GPT 出现之前,NLP 模型主要是基于针对特定任务的大量标注数据进行训练。但会存在一些限制:大规模高质量的标注数据不易获得;模型仅限于所接受的训练,泛化能力不足;无法执行开箱即用的任务,限制了模型的落地应用。为了克服这些问题,OpenAI 走上了预训练大模型的道路。从 GPT-1 到 ChatGPT,就是一个预训练模型越来越大、效果越来越强的过程, 不断迭代。 在OpenAI的官网上,ChatGPT被描述为优化对话的语言模型,是GPT-3.5架构的主力模型。GPT- 3.5架构基于OpenAI于2020年推出的GPT-3架构,即生成式语言模型的第3代。早在2020年6月,在训练约2000亿个单词、烧掉几千万美元后,史上最强大AI模型GPT-3一炮而红。 产品功能 作为聊天机器人,ChatGPT具有同类产品具备的一些特性,例如对话能力,能够在同一个会话期间内回答上下文相关的后续问题。
资源推荐
资源详情
资源评论
收起资源包目录
OpenAI Gym 是一个用于开发和比较强化学习算法的工具包.zip (303个子文件)
docker_entrypoint 484B
py.Dockerfile 1016B
.gitignore 411B
README.md 5KB
CONTRIBUTING.md 4KB
PULL_REQUEST_TEMPLATE.md 2KB
LICENSE.md 1KB
README.md 1KB
bug.md 875B
proposal.md 810B
question.md 594B
Card.png 43KB
hotel.png 21KB
HQ.png 20KB
SQ.png 19KB
HK.png 19KB
CK.png 19KB
SK.png 19KB
DK.png 19KB
CQ.png 18KB
CJ.png 18KB
DJ.png 18KB
HJ.png 18KB
DQ.png 18KB
SJ.png 18KB
CT.png 10KB
C9.png 10KB
S9.png 10KB
ST.png 10KB
C8.png 10KB
DT.png 9KB
D9.png 9KB
S8.png 9KB
H9.png 9KB
HT.png 9KB
D8.png 9KB
H8.png 9KB
C7.png 9KB
S7.png 8KB
C6.png 8KB
S6.png 8KB
D7.png 8KB
H7.png 8KB
C5.png 8KB
D6.png 8KB
H6.png 8KB
S5.png 8KB
D5.png 7KB
H5.png 7KB
C4.png 7KB
S4.png 7KB
clockwise.png 7KB
C3.png 7KB
HA.png 7KB
S3.png 7KB
D4.png 7KB
SA.png 6KB
H4.png 6KB
CA.png 6KB
D3.png 6KB
H3.png 6KB
C2.png 6KB
DA.png 6KB
S2.png 6KB
D2.png 6KB
H2.png 6KB
cookie.png 3KB
gridworld_median_top.png 3KB
gridworld_median_bottom.png 3KB
gridworld_median_vert.png 3KB
gridworld_median_left.png 3KB
gridworld_median_right.png 2KB
gridworld_median_horiz.png 2KB
taxi_background.png 2KB
cab_right.png 970B
cab_left.png 955B
elf_down.png 935B
cab_rear.png 892B
cab_front.png 891B
elf_left.png 872B
elf_right.png 858B
elf_up.png 842B
passenger.png 817B
cracked_hole.png 706B
mountain_near-cliff1.png 706B
mountain_near-cliff2.png 704B
hole.png 676B
mountain_bg1.png 651B
stool.png 651B
mountain_bg2.png 643B
goal.png 526B
ice.png 494B
mountain_cliff.png 442B
bipedal_walker.py 30KB
lunar_lander.py 29KB
car_racing.py 28KB
humanoid_v4.py 27KB
async_vector_env.py 27KB
registration.py 26KB
humanoidstandup_v4.py 21KB
共 303 条
- 1
- 2
- 3
- 4
资源评论
野生的狒狒
- 粉丝: 2645
- 资源: 2167
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功