File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Skew-Fit
2
2
Requires [ multiworld] ( https://github.com/vitchyr/multiworld ) to be installed:
3
3
```
4
- pip install git+https://github.com/vitchyr/multiworld.git@28ee206f60a45690d484737466b558abdef191ea
4
+ pip install git+https://github.com/vitchyr/multiworld.git@f711cdb
5
5
```
6
6
7
7
Implementation of Skew-Fit. For more information:
8
8
- [ Videos] ( https://sites.google.com/view/skew-fit )
9
9
- [ 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
+
11
18
Here are the results you should expect from each script.
12
19
These plots are generated with [ viskit] ( https://github.com/vitchyr/viskit )
13
20
with smoothing on.
Original file line number Diff line number Diff line change 1
1
"""
2
- Run DQN on grid world .
2
+ Run DQN on CartPole-v0 .
3
3
"""
4
4
5
5
import gym
19
19
20
20
21
21
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
24
24
obs_dim = expl_env .observation_space .low .size
25
25
action_dim = eval_env .action_space .n
26
26
@@ -71,12 +71,10 @@ def experiment(variant):
71
71
algorithm .train ()
72
72
73
73
74
-
75
-
76
74
if __name__ == "__main__" :
77
75
# noinspection PyTypeChecker
78
76
variant = dict (
79
- algorithm = "SAC " ,
77
+ algorithm = "DQN " ,
80
78
version = "normal" ,
81
79
layer_size = 256 ,
82
80
replay_buffer_size = int (1E6 ),
@@ -94,6 +92,6 @@ def experiment(variant):
94
92
learning_rate = 3E-4 ,
95
93
),
96
94
)
97
- setup_logger ('name-of-experiment ' , variant = variant )
95
+ setup_logger ('dqn-CartPole ' , variant = variant )
98
96
# ptu.set_gpu_mode(True) # optionally set the GPU (default=False)
99
97
experiment (variant )
You can’t perform that action at this time.
0 commit comments