[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1446":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":24,"defaultBranch":25,"hasWiki":23,"hasPages":24,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},1446,"gym","openai\u002Fgym","openai","A toolkit for developing and comparing reinforcement learning algorithms.","https:\u002F\u002Fwww.gymlibrary.dev",null,"Python",37223,8705,1039,113,0,1,15,46,10,45,"Other",true,false,"master",[],"2026-06-12 02:00:28","[![pre-commit](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https:\u002F\u002Fpre-commit.com\u002F) [![Code style: black](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg)](https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack)\n\n## Important Notice\n\n### The team that has been maintaining Gym since 2021 has moved all future development to [Gymnasium](https:\u002F\u002Fgithub.com\u002FFarama-Foundation\u002FGymnasium), 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:\u002F\u002Ffarama.org\u002FAnnouncing-The-Farama-Foundation).\n\n## Gym\n\nGym 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.\n\nGym documentation website is at [https:\u002F\u002Fwww.gymlibrary.dev\u002F](https:\u002F\u002Fwww.gymlibrary.dev\u002F), and you can propose fixes and changes to it [here](https:\u002F\u002Fgithub.com\u002FFarama-Foundation\u002Fgym-docs).\n\nGym also has a discord server for development purposes that you can join here: https:\u002F\u002Fdiscord.gg\u002FnHg2JRN489\n\n## Installation\n\nTo install the base Gym library, use `pip install gym`.\n\nThis 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.\n\nWe 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.\n\n## API\n\nThe 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:\n\n```python\nimport gym\nenv = gym.make(\"CartPole-v1\")\nobservation, info = env.reset(seed=42)\n\nfor _ in range(1000):\n    action = env.action_space.sample()\n    observation, reward, terminated, truncated, info = env.step(action)\n\n    if terminated or truncated:\n        observation, info = env.reset()\nenv.close()\n```\n\n## Notable Related Libraries\n\nPlease note that this is an incomplete list, and just includes libraries that the maintainers most commonly point newcommers to when asked for recommendations.\n\n* [CleanRL](https:\u002F\u002Fgithub.com\u002Fvwxyzjn\u002Fcleanrl) 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.\n* [Tianshou](https:\u002F\u002Fgithub.com\u002Fthu-ml\u002Ftianshou) is a learning library that's geared towards very experienced users and is design to allow for ease in complex algorithm modifications.\n* [RLlib](https:\u002F\u002Fdocs.ray.io\u002Fen\u002Flatest\u002Frllib\u002Findex.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.\n* [PettingZoo](https:\u002F\u002Fgithub.com\u002FFarama-Foundation\u002FPettingZoo) is like Gym, but for environments with multiple agents.\n\n## Environment Versioning\n\nGym 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.\n\n## MuJoCo Environments\n\nThe 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.\nTo 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]`. \n\n## Citation\n\nA whitepaper from when Gym just came out is available https:\u002F\u002Farxiv.org\u002Fpdf\u002F1606.01540, and can be cited with the following bibtex entry:\n\n```\n@misc{1606.01540,\n  Author = {Greg Brockman and Vicki Cheung and Ludwig Pettersson and Jonas Schneider and John Schulman and Jie Tang and Wojciech Zaremba},\n  Title = {OpenAI Gym},\n  Year = {2016},\n  Eprint = {arXiv:1606.01540},\n}\n```\n\n## Release Notes\n\nThere used to be release notes for all the new Gym versions here. New release notes are being moved to [releases page](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fgym\u002Freleases) on GitHub, like most other libraries do. Old notes can be viewed [here](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fgym\u002Fblob\u002F31be35ecd460f670f0c4b653a14c9996b7facc6c\u002FREADME.rst).\n","Gym是一个用于开发和比较强化学习算法的开源Python库。它通过提供一个标准API来促进学习算法与环境之间的通信，并且包含了一套符合该API标准的环境集合。Gym支持多种类型的环境，包括Atari游戏、经典控制问题等，便于用户根据需求选择安装特定环境或全部环境。其简洁易用的设计使得无论是学术研究还是个人项目中测试强化学习算法都非常方便。虽然官方已宣布将不再维护Gym而转向Gymnasium，但Gym仍然是入门强化学习时不可或缺的工具之一。",2,"2026-06-11 02:43:50","top_all"]