From baf507f6bffdf3884c147127ab766c7524eaccad Mon Sep 17 00:00:00 2001 From: Ilya Kostrikov Date: Thu, 5 Oct 2017 15:54:39 -0400 Subject: [PATCH] Add pybullet support --- README.md | 8 ++++++++ envs.py | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 157b968..6df93d7 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,16 @@ It's extremely difficult to reproduce results for Reinforcement Learning methods * Improve performance of KFAC, see kfac.py for more information * Run evaluation for all games and algorithms +## Requirements + +* [PyTorch](http://pytorch.org/) +* [Visdom](https://github.com/facebookresearch/visdom) +* [OpenAI baselines](https://github.com/openai/baselines) + ## Usage +Start a `Visdom` server with `python -m visdom.server`, it will serve `http://localhost:8097/` by default. + ### Atari #### A2C diff --git a/envs.py b/envs.py index 626bb15..53c89b6 100755 --- a/envs.py +++ b/envs.py @@ -9,7 +9,11 @@ from baselines.common.atari_wrappers import wrap_deepmind def make_env(env_id, seed, rank, log_dir): def _thunk(): - env = gym.make(env_id) + if env_id.find('Bullet') > -1: + import pybullet_envs + env = pybullet_envs.make(env_id) + else: + env = gym.make(env_id) env.seed(seed + rank) env = bench.Monitor(env, os.path.join(log_dir,