Skip to content

Commit

Permalink
Merge pull request #116 from Unity-Technologies/develop-4
Browse files Browse the repository at this point in the history
[WIP] Update to 4.0 release
  • Loading branch information
awjuliani authored Jul 1, 2020
2 parents c05fd80 + b83c68c commit 008236b
Show file tree
Hide file tree
Showing 5 changed files with 181 additions and 119 deletions.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ To learn more, please read our AAAI Workshop paper:
* Added evaluation script for benchmarking, along with official benchmarking guidelines.
* v3.1 Minor release.
* Updates Unity project to 2019.2 and ML-Agents version to 0.10.
* 4.0 Major project updates
* Unity project updated to 2019.4 LTS.
* ML-Agents package updated to 1.1.0 (Release 3).
* Gym wrapper now uses registry by default to auto-download binary.


## Installation
Expand All @@ -54,19 +58,21 @@ The Obstacle Tower environment runs on Mac OS X, Windows, or Linux.

Python dependencies (also in [setup.py](https://github.com/Unity-Technologies/obstacle-tower-env/blob/master/setup.py)):

* Python 3.6
* Unity ML-Agents v0.10
* Python 3.6+
* Unity ML-Agents 1.x
* OpenAI Gym

### Download the environment
### Download the environment (optional)

By default, the binary will be automatically downloaded when the Obstacle Tower gym is first instantiated. The binaries for each platform can be separately downloaded at the following links.

| *Platform* | *Download Link* |
| --- | --- |
| Linux (x86_64) | https://storage.googleapis.com/obstacle-tower-build/v3.1/obstacletower_v3.1_linux.zip |
| Mac OS X | https://storage.googleapis.com/obstacle-tower-build/v3.1/obstacletower_v3.1_osx.zip |
| Windows | https://storage.googleapis.com/obstacle-tower-build/v3.1/obstacletower_v3.1_windows.zip |
| Linux (x86_64) | https://storage.googleapis.com/obstacle-tower-build/v4.0/obstacletower_v4.0_linux.zip |
| Mac OS X | https://storage.googleapis.com/obstacle-tower-build/v4.0/obstacletower_v4.0_osx.zip |
| Windows | https://storage.googleapis.com/obstacle-tower-build/v4.0/obstacletower_v4.0_windows.zip |

For checksums on these files, see [here](https://storage.googleapis.com/obstacle-tower-build/v3.1/ote-v3.1-checksums.txt).
For checksums on these files, see [here](https://storage.googleapis.com/obstacle-tower-build/v4.0/ote-v4.0-checksums.txt).

### Install the Gym interface

Expand Down
8 changes: 4 additions & 4 deletions examples/basic_usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"metadata": {},
"source": [
"## Launching the environment\n",
"Ensure that the Obstacle Tower binary has been downloaded (https://github.com/Unity-Technologies/obstacle-tower-env#download-the-environment), and placed in the correct sub-folder. Here we use the `examples/ObstacleTower` sub-folder."
"The binary for Obstacle Tower will be automatically downloaded when the environment is first initialized."
]
},
{
Expand All @@ -36,7 +36,7 @@
"# as well as whether the environment will run at realtime speed. Set this to `True`\n",
"# to visual the agent behavior as you would in player mode.\n",
"\n",
"env = ObstacleTowerEnv('./ObstacleTower/obstacletower', retro=False, realtime_mode=False)"
"env = ObstacleTowerEnv(retro=False, realtime_mode=False)"
]
},
{
Expand Down Expand Up @@ -174,7 +174,7 @@
"metadata": {},
"outputs": [],
"source": [
"env = ObstacleTowerEnv('./ObstacleTower/obstacletower', retro=True)"
"env = ObstacleTowerEnv(retro=True)"
]
},
{
Expand Down Expand Up @@ -247,7 +247,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.8.3"
}
},
"nbformat": 4,
Expand Down
12 changes: 6 additions & 6 deletions examples/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@
def run_episode(env):
done = False
episode_return = 0.0

while not done:
action = env.action_space.sample()
obs, reward, done, info = env.step(action)
episode_return += reward
return episode_return


if __name__ == '__main__':
# In this example we use the seeds used for evaluating submissions
if __name__ == "__main__":
# In this example we use the seeds used for evaluating submissions
# to the Obstacle Tower Challenge.
eval_seeds = [1001, 1002, 1003, 1004, 1005]

# Create the ObstacleTowerEnv gym and launch ObstacleTower
env = ObstacleTowerEnv('./ObstacleTower/obstacletower')
env = ObstacleTowerEnv("./ObstacleTower/obstacletower")

# Wrap the environment with the ObstacleTowerEvaluation wrapper
# and provide evaluation seeds.
env = ObstacleTowerEvaluation(env, eval_seeds)

# We can run episodes (in this case with a random policy) until
# We can run episodes (in this case with a random policy) until
# the "evaluation_complete" flag is True. Attempting to step or reset after
# all of the evaluation seeds have completed will result in an exception.
while not env.evaluation_complete:
episode_rew = run_episode(env)

# Finally the evaluation results can be fetched as a dictionary from the
# Finally the evaluation results can be fetched as a dictionary from the
# environment wrapper.
print(env.results)

Expand Down
Loading

0 comments on commit 008236b

Please sign in to comment.