Merge pull request #1 from Unity-Technologies/jh/initial
Initial commit
This commit is contained in:
Коммит
8bec9610e6
|
@ -0,0 +1,3 @@
|
|||
UnitySDK.log
|
||||
__pycache__
|
||||
.DS_STORE
|
34
README.md
34
README.md
|
@ -1,2 +1,32 @@
|
|||
# obstacle-tower-challenge
|
||||
Repository for the MLAgents Obstacle Tower challenge
|
||||
# Obstacle Tower Challenge Starter Kit
|
||||
|
||||
## Setup
|
||||
|
||||
* **Docker** https://www.docker.com/products/docker-desktop
|
||||
* **repo2docker**
|
||||
|
||||
```
|
||||
pip install crowdai-repo2docker
|
||||
```
|
||||
|
||||
## Build Docker image
|
||||
|
||||
```
|
||||
./build.sh
|
||||
```
|
||||
|
||||
## Run Docker image
|
||||
|
||||
```
|
||||
# Start the docker image, which will run Jupyter notebook
|
||||
docker run --name obstacle_tower -it obstacle_tower_challenge:latest
|
||||
|
||||
# In another terminal window, execute the run.
|
||||
docker exec -it obstacle_tower ./run.sh
|
||||
```
|
||||
|
||||
## Local Run
|
||||
|
||||
```
|
||||
./run.sh
|
||||
```
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
curl
|
||||
git
|
||||
xvfb
|
|
@ -0,0 +1,7 @@
|
|||
export IMAGE_NAME="obstacle_tower_challenge"
|
||||
|
||||
crowdai-repo2docker --no-run \
|
||||
--user-id 1001 \
|
||||
--user-name crowdai \
|
||||
--image-name ${IMAGE_NAME} \
|
||||
--debug .
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"challenge_id" : "crowdai-mlagents-2018-obstacletower",
|
||||
"grader_id": "crowdai-mlagents-2018-obstacletower",
|
||||
"authors" : ["harperj"],
|
||||
"description" : "Obstacle Tower random agent",
|
||||
"gpu": false
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
curl https://storage.googleapis.com/obstacle-tower-build/obstacletower_linux.zip > obstacletower_linux.zip
|
||||
unzip obstacletower_linux.zip
|
|
@ -0,0 +1 @@
|
|||
git+git://github.com/Unity-Technologies/obstacle-tower-env@master
|
|
@ -0,0 +1,28 @@
|
|||
from obstacle_tower_env import ObstacleTowerEnv
|
||||
import sys
|
||||
|
||||
def run_episode(env):
|
||||
env.reset()
|
||||
done = False
|
||||
reward = 0.0
|
||||
|
||||
while not done:
|
||||
action = env.action_space.sample()
|
||||
obs, reward, done, info = env.step(action)
|
||||
return reward
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
environment_filename = \
|
||||
sys.argv[1] if len(sys.argv) > 1 else './ObstacleTower/obstacletower'
|
||||
|
||||
env = ObstacleTowerEnv(environment_filename)
|
||||
if env.is_grading():
|
||||
episode_reward = run_episode(env)
|
||||
else:
|
||||
while True:
|
||||
episode_reward = run_episode(env)
|
||||
print("Episode reward: " + str(episode_reward))
|
||||
|
||||
env.close()
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Use This line would work in case of the docker container
|
||||
# Else the relevant env variables will not be loaded during evaluatino
|
||||
source activate base
|
||||
echo "root"
|
||||
|
||||
python run.py
|
Загрузка…
Ссылка в новой задаче