Skip to content

Commit 0073d73

Browse files
committed
Merge branch 'master' of github.com:vitchyr/rlkit
2 parents 5d97f53 + 7daf34b commit 0073d73

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

docs/SkewFit.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
# Skew-Fit
22
Requires [multiworld](https://github.com/vitchyr/multiworld) to be installed:
33
```
4-
pip install git+https://github.com/vitchyr/multiworld.git@28ee206f60a45690d484737466b558abdef191ea
4+
pip install git+https://github.com/vitchyr/multiworld.git@f711cdb
55
```
66

77
Implementation of Skew-Fit. For more information:
88
- [Videos](https://sites.google.com/view/skew-fit)
99
- [arXiv](https://arxiv.org/abs/1903.03698)
10-
10+
11+
To reproduce the results, use these library versions as the performance seems to depend on the library version:
12+
- multiworld: f711cdb (git hash)
13+
- python: 3.5.2
14+
- torch: 0.4.1.post2
15+
- mujoco_py: 1.50.1.59
16+
- gym: 0.10.5
17+
1118
Here are the results you should expect from each script.
1219
These plots are generated with [viskit](https://github.com/vitchyr/viskit)
1320
with smoothing on.

examples/dqn_and_double_dqn.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Run DQN on grid world.
2+
Run DQN on CartPole-v0.
33
"""
44

55
import gym
@@ -19,8 +19,8 @@
1919

2020

2121
def experiment(variant):
22-
expl_env = gym.make('CartPole-v0')
23-
eval_env = gym.make('CartPole-v0')
22+
expl_env = gym.make('CartPole-v0').env
23+
eval_env = gym.make('CartPole-v0').env
2424
obs_dim = expl_env.observation_space.low.size
2525
action_dim = eval_env.action_space.n
2626

@@ -71,12 +71,10 @@ def experiment(variant):
7171
algorithm.train()
7272

7373

74-
75-
7674
if __name__ == "__main__":
7775
# noinspection PyTypeChecker
7876
variant = dict(
79-
algorithm="SAC",
77+
algorithm="DQN",
8078
version="normal",
8179
layer_size=256,
8280
replay_buffer_size=int(1E6),
@@ -94,6 +92,6 @@ def experiment(variant):
9492
learning_rate=3E-4,
9593
),
9694
)
97-
setup_logger('name-of-experiment', variant=variant)
95+
setup_logger('dqn-CartPole', variant=variant)
9896
# ptu.set_gpu_mode(True) # optionally set the GPU (default=False)
9997
experiment(variant)

rlkit/envs/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)