Upload policy_config.py with huggingface_hub
Browse files- policy_config.py +117 -0
policy_config.py
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
exp_config = {
|
2 |
+
'main_config': {
|
3 |
+
'exp_name': 'LunarLander-v2-MuZero',
|
4 |
+
'env': {
|
5 |
+
'env_id': 'LunarLander-v2',
|
6 |
+
'continuous': False,
|
7 |
+
'manually_discretization': False,
|
8 |
+
'collector_env_num': 8,
|
9 |
+
'evaluator_env_num': 3,
|
10 |
+
'n_evaluator_episode': 3,
|
11 |
+
'manager': {
|
12 |
+
'shared_memory': False
|
13 |
+
}
|
14 |
+
},
|
15 |
+
'policy': {
|
16 |
+
'on_policy': False,
|
17 |
+
'cuda': True,
|
18 |
+
'multi_gpu': False,
|
19 |
+
'bp_update_sync': True,
|
20 |
+
'traj_len_inf': False,
|
21 |
+
'model': {
|
22 |
+
'observation_shape': 8,
|
23 |
+
'action_space_size': 4,
|
24 |
+
'model_type': 'mlp',
|
25 |
+
'lstm_hidden_size': 256,
|
26 |
+
'latent_state_dim': 256,
|
27 |
+
'self_supervised_learning_loss': True,
|
28 |
+
'discrete_action_encoding_type': 'one_hot',
|
29 |
+
'res_connection_in_dynamics': True,
|
30 |
+
'norm_type': 'BN'
|
31 |
+
},
|
32 |
+
'use_rnd_model': False,
|
33 |
+
'sampled_algo': False,
|
34 |
+
'gumbel_algo': False,
|
35 |
+
'mcts_ctree': True,
|
36 |
+
'collector_env_num': 8,
|
37 |
+
'evaluator_env_num': 3,
|
38 |
+
'env_type': 'not_board_games',
|
39 |
+
'battle_mode': 'play_with_bot_mode',
|
40 |
+
'monitor_extra_statistics': True,
|
41 |
+
'game_segment_length': 200,
|
42 |
+
'transform2string': False,
|
43 |
+
'gray_scale': False,
|
44 |
+
'use_augmentation': False,
|
45 |
+
'augmentation': ['shift', 'intensity'],
|
46 |
+
'ignore_done': False,
|
47 |
+
'update_per_collect': 200,
|
48 |
+
'model_update_ratio': 0.1,
|
49 |
+
'batch_size': 256,
|
50 |
+
'optim_type': 'Adam',
|
51 |
+
'learning_rate': 0.003,
|
52 |
+
'target_update_freq': 100,
|
53 |
+
'target_update_freq_for_intrinsic_reward': 1000,
|
54 |
+
'weight_decay': 0.0001,
|
55 |
+
'momentum': 0.9,
|
56 |
+
'grad_clip_value': 0.5,
|
57 |
+
'n_episode': 8,
|
58 |
+
'num_simulations': 50,
|
59 |
+
'discount_factor': 0.997,
|
60 |
+
'td_steps': 5,
|
61 |
+
'num_unroll_steps': 5,
|
62 |
+
'reward_loss_weight': 1,
|
63 |
+
'value_loss_weight': 0.25,
|
64 |
+
'policy_loss_weight': 1,
|
65 |
+
'policy_entropy_loss_weight': 0,
|
66 |
+
'ssl_loss_weight': 2,
|
67 |
+
'lr_piecewise_constant_decay': False,
|
68 |
+
'threshold_training_steps_for_final_lr': 50000,
|
69 |
+
'manual_temperature_decay': False,
|
70 |
+
'threshold_training_steps_for_final_temperature': 100000,
|
71 |
+
'fixed_temperature_value': 0.25,
|
72 |
+
'use_ture_chance_label_in_chance_encoder': False,
|
73 |
+
'use_priority': True,
|
74 |
+
'priority_prob_alpha': 0.6,
|
75 |
+
'priority_prob_beta': 0.4,
|
76 |
+
'root_dirichlet_alpha': 0.3,
|
77 |
+
'root_noise_weight': 0.25,
|
78 |
+
'random_collect_episode_num': 0,
|
79 |
+
'eps': {
|
80 |
+
'eps_greedy_exploration_in_collect': False,
|
81 |
+
'type': 'linear',
|
82 |
+
'start': 1.0,
|
83 |
+
'end': 0.05,
|
84 |
+
'decay': 100000
|
85 |
+
},
|
86 |
+
'cfg_type': 'MuZeroPolicyDict',
|
87 |
+
'reanalyze_ratio': 0.0,
|
88 |
+
'eval_freq': 1000,
|
89 |
+
'replay_buffer_size': 1000000
|
90 |
+
},
|
91 |
+
'wandb_logger': {
|
92 |
+
'gradient_logger': False,
|
93 |
+
'video_logger': False,
|
94 |
+
'plot_logger': False,
|
95 |
+
'action_logger': False,
|
96 |
+
'return_logger': False
|
97 |
+
}
|
98 |
+
},
|
99 |
+
'create_config': {
|
100 |
+
'env': {
|
101 |
+
'type': 'lunarlander',
|
102 |
+
'import_names': ['zoo.box2d.lunarlander.envs.lunarlander_env']
|
103 |
+
},
|
104 |
+
'env_manager': {
|
105 |
+
'type': 'subprocess'
|
106 |
+
},
|
107 |
+
'policy': {
|
108 |
+
'type': 'muzero',
|
109 |
+
'import_names': ['lzero.policy.muzero']
|
110 |
+
},
|
111 |
+
'collector': {
|
112 |
+
'type': 'episode_muzero',
|
113 |
+
'get_train_sample': True,
|
114 |
+
'import_names': ['lzero.worker.muzero_collector']
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|