-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprepare
More file actions
executable file
·79 lines (66 loc) · 1.92 KB
/
Copy pathprepare
File metadata and controls
executable file
·79 lines (66 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python3
# --------------------------------------------------------------------
# Prepare the rl-baselines3-zoo submodule for use with mazelab.
# --------------------------------------------------------------------
hyperparams = r"""
CoinFlipGoalWithGroundTruth:
policy: 'MlpPolicy'
gamma: 0.97
n_timesteps: !!float 45000
normalize: false
learning_rate: lin_1.0e-4
CoinFlipGoalWithCoinFlipGoalRewardModel:
policy: 'MlpPolicy'
gamma: 0.97
n_timesteps: !!float 45000
normalize: false
learning_rate: lin_1.0e-4
env_wrapper:
- interp.common.wrappers.WrapWithRewardModel:
model_path: "../reward-models/EmptyMaze-10x10-CoinFlipGoal-v3-reward_model.pt"
TwoGoalsWithGroundTruth:
policy: 'MlpPolicy'
gamma: 0.97
n_timesteps: !!float 45000
normalize: false
learning_rate: lin_1.0e-4
TwoGoalsWithCoinFlipGoalRewardModel:
policy: 'MlpPolicy'
gamma: 0.97
n_timesteps: !!float 45000
normalize: false
learning_rate: lin_1.0e-4
env_wrapper:
- interp.common.wrappers.WrapWithRewardModel:
model_path: "../reward-models/EmptyMaze-10x10-CoinFlipGoal-v3-reward_model.pt"
EmptyMaze-10x10-FixedGoal-v3:
policy: 'MlpPolicy'
gamma: 0.97
n_timesteps: !!float 30000
normalize: false
learning_rate: lin_1.0e-4
EmptyMaze-10x10-FixedGoal-v3:
policy: 'MlpPolicy'
gamma: 0.97
n_timesteps: !!float 30000
normalize: false
learning_rate: lin_1.0e-4
EmptyMaze-10x10-CoinFlipGoal-v3:
policy: 'MlpPolicy'
gamma: 0.97
n_timesteps: !!float 45000
normalize: false
learning_rate: lin_1.0e-4
EmptyMaze-10x10-RandomGoal-v3:
policy: 'MlpPolicy'
gamma: 0.97
n_timesteps: !!float 250000
normalize: false
learning_rate: lin_1.0e-4
"""
if __name__ == '__main__':
with open('rl-baselines3-zoo/hyperparams/ppo.yml', 'r') as f:
original = f.read()
new = hyperparams + original
with open('rl-baselines3-zoo/hyperparams/ppo.yml', 'w') as f:
f.write(new)