-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathddpg_mountaincar_continuous.py
More file actions
42 lines (38 loc) · 1.03 KB
/
ddpg_mountaincar_continuous.py
File metadata and controls
42 lines (38 loc) · 1.03 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
env = dict(
type='MountainCarContinuous-v0',
monitor_freq=20,
render=False,
num_epochs_solved=100)
agent=dict(type='DDPG',
actor = dict(type='MLPNet',
hidden_layers=[50,30],
act_cfg=dict(type='SiLU')),
critic = dict(type='MLPNet',
hidden_layers=[50,30],
act_cfg=dict(type='SiLU')),
action_noise = dict(std=0.2,noise_clip=0.6,decay_factor=0.999),
buffer= dict(type='BaseBuffer',
capacity=8000,
batch_size=256),
actor_optimizer= dict(type='Adam',lr=1e-3),
critic_optimizer= dict(type='Adam',lr=1e-3),
gamma=0.995,
explore_rate=0.3,
polyak=0.995,
start_epochs=100,
)
num_epochs=300
# checkpoint saving
checkpoint_config = dict(interval=20)
# yapf:disable
log_config = dict(
interval=100,
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])
# yapf:enable
# dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None