https://github.com/postrational/gym-demo
Explore OpenAI Gym environments
https://github.com/postrational/gym-demo
Last synced: about 1 year ago
JSON representation
Explore OpenAI Gym environments
- Host: GitHub
- URL: https://github.com/postrational/gym-demo
- Owner: postrational
- License: mit
- Created: 2019-02-17T12:30:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-02T06:59:45.000Z (over 1 year ago)
- Last Synced: 2025-04-04T17:47:20.699Z (about 1 year ago)
- Language: Python
- Size: 284 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/postrational/gym-demo)
[](https://coveralls.io/github/postrational/gym-demo?branch=master)
[](https://www.codacy.com/app/postrational/gym-demo?utm_source=github.com&utm_medium=referral&utm_content=postrational/gym-demo&utm_campaign=Badge_Grade)
[](https://badge.fury.io/py/gym-demo)
# gym-demo
##### Explore OpenAI Gym environments
This package provides the `gym-demo` command, which allows you to
explore the various [Open AI gym][gym] environments installed on your
system.
This allows you to get a quick overview of an environment before you
start working on it. You will get information about the environments
*observation space*, *action space* as well as the *rewards* you can
expect to get and other available information.
[](https://www.youtube.com/watch?v=fHuqpwXBBtg)
### Installation
You can install OpenAI Gym and `gym-demo` using `pip`:
$ pip install gym[atari]
$ pip install gym-demo
### Usage
Use `gym-demo --help` to display usage information and a list of
environments installed in your Gym.
$ gym-demo --help
Start a demo of an environment to get information about its observation
and action space and observe the rewards an agent gets during a random
run.
$ gym-demo SpaceInvaders-ram-v4
Environment: SpaceInvaders-ram-v4
Observation Space: Box(128,)
Low values:
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
High values:
[255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
255 255]
Action Space: Discrete(6)
Action meanings: ['NOOP', 'FIRE', 'RIGHT', 'LEFT', 'RIGHTFIRE', 'LEFTFIRE']
Running environment demonstration...
Unique environment information is output to standard out:
Reward: 0.0, Done: False, Info: {'ale.lives': 3}
Reward: 5.0, Done: False, Info: {'ale.lives': 3}
Reward: 0.0, Done: False, Info: {'ale.lives': 3}
Reward: 10.0, Done: False, Info: {'ale.lives': 3}
Reward: 0.0, Done: False, Info: {'ale.lives': 3}
Reward: 15.0, Done: False, Info: {'ale.lives': 3}
Reward: 0.0, Done: False, Info: {'ale.lives': 3}
Reward: 20.0, Done: False, Info: {'ale.lives': 3}
Reward: 0.0, Done: False, Info: {'ale.lives': 3}
Reward: 25.0, Done: False, Info: {'ale.lives': 3}
Reward: 0.0, Done: False, Info: {'ale.lives': 3}
Reward: 0.0, Done: False, Info: {'ale.lives': 2}
Reward: 30.0, Done: False, Info: {'ale.lives': 2}
Reward: 0.0, Done: False, Info: {'ale.lives': 2}
Reward: 0.0, Done: False, Info: {'ale.lives': 1}
Reward: 5.0, Done: False, Info: {'ale.lives': 1}
Reward: 0.0, Done: False, Info: {'ale.lives': 1}
Reward: 10.0, Done: False, Info: {'ale.lives': 1}
Reward: 0.0, Done: False, Info: {'ale.lives': 1}
Reward: 15.0, Done: False, Info: {'ale.lives': 1}
Reward: 0.0, Done: False, Info: {'ale.lives': 1}
Reward: 20.0, Done: False, Info: {'ale.lives': 1}
Reward: 0.0, Done: False, Info: {'ale.lives': 1}
Reward: 0.0, Done: True, Info: {'ale.lives': 0}
Get mode information about [Open AI gym][gym_site] on their [documentation website][gym_docs].
[gym_docs]: https://gym.openai.com/docs/ "OpenAI Gym Documentation"
[gym_site]: https://gym.openai.com/ "OpenAI Gym"
[gym]: https://github.com/openai/gym "OpenAI Gym GitHub"