-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional gym wrapper #1007
Merged
Merged
Optional gym wrapper #1007
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
9b97bf0
Add initial gym wrapper
awjuliani ab8779a
Default to visual observations when present
awjuliani 22dd085
Rename class
awjuliani b657115
Rename to unity_gym
awjuliani 48c505f
Restructure files
awjuliani ede6f66
Merge branch 'develop' into develop-gym
awjuliani b90d7f3
Merge remote-tracking branch 'origin/develop' into develop-gym
awjuliani bcd8d99
Fix line length
awjuliani ca60778
Rename and add documentation
awjuliani 91bde1b
New notebook
awjuliani 24635f7
Additional documentation improvements
awjuliani 155b166
Update documentation
awjuliani 7c05c1f
Remove unnecessary docstrings
awjuliani 5072e36
Fix single agent bug
awjuliani 814007b
Merge remote-tracking branch 'origin/develop' into develop-gym
awjuliani 5a7d095
Re-organize folders
awjuliani 3d72cc6
Merge remote-tracking branch 'origin/develop' into develop-gym
awjuliani d984c30
Clean notebook
awjuliani 97fdb16
Update documentation
awjuliani e7337e4
Remove /
awjuliani 167383f
Fix link reference
awjuliani da32896
Update documentation
awjuliani 37ca201
Refer to it as a wrapper
awjuliani 2a4b582
Only allow one agent in single agent env
awjuliani dea3048
Allow only one agent in single agent env
awjuliani 97bcc0c
Remove notebook checkpoint
awjuliani 54c3dbe
Use find_packages() in setup
awjuliani 64cb610
Merge into single wrapper
awjuliani 7133d54
Update getting started notebook
awjuliani 0a61ef8
Ignore checkpoints
awjuliani 1dbe32e
Code cleanup
awjuliani 1a988c5
Add initial tests
awjuliani b1658a2
Ignore pytest cache
awjuliani 47d49f8
Merge branch 'develop' into develop-gym
awjuliani 0746c68
Add documentation on using baselines
awjuliani c28ced2
Typo and formatting
awjuliani 61457b6
Replace references to Basics.ipynb
awjuliani e8e6190
Address comments
awjuliani c588198
Merge remote-tracking branch 'origin/develop' into develop-gym
awjuliani 9994d70
Fix pip install name
awjuliani 5446462
Fix for multi-discrete
awjuliani 5aecf66
Fix for continuous control
awjuliani e0e3218
Change use_visual functionality
awjuliani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
# ML-Agents Gym Wrapper | ||
# Unity ML-Agents Gym Wrapper | ||
|
||
## `gym_wrapper.py` | ||
First draft on a gym wrapper for ML-Agents. To launch an environmnent do : | ||
A common way in which researchers interact with simulation environments is via wrapper provided by OpenAI called `gym`. Here we provide a gym wrapper, and instructions for using it with existing research projects which utilize gyms. | ||
|
||
## `unity_gym.py` | ||
First draft on a gym wrapper for ML-Agents. To launch an environmnent use : | ||
|
||
```python | ||
raw_env = UnityEnvironment(<env-name>) | ||
env = GymWrapper(raw_env) | ||
env = GymWrapper(environment_filename, worker_id, default_visual) | ||
``` | ||
|
||
The environment `env` will behave like a gym. | ||
* `environment_filename` refers to the path to the Unity environment. | ||
* `worker_id` refers to the port to use for communication with the environment. | ||
* `default_visual` refers to whether to use visual observations (True) or vector observations (False) as the default observation provided by the `reset` and `step` functions. | ||
|
||
The resulting environment `env` will behave like a gym. | ||
|
||
__Limitations :__ | ||
|
||
* Only works with environments containing one external brain | ||
* Only works with environments containing one agent | ||
* Only first agent in first external brain will be exposed via API. | ||
* By default the first visual observation is provided as the `observation`, if present. Otherwise vector observations are provided. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/enviromnent/environment