File size: 15,724 Bytes
62e03a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
2023-05-15 21:17:21 - SimpleLog - INFO: - General Configs:
2023-05-15 21:17:21 - SimpleLog - INFO: - ================================================================================
2023-05-15 21:17:21 - SimpleLog - INFO: -         Name        	       Value        	        Type        
2023-05-15 21:17:21 - SimpleLog - INFO: -       env_name      	        gym         	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -     render_mode     	        None        	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -      algo_name      	        DQN         	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -         mode        	       train        	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -     collect_traj    	         0          	   <class 'bool'>   
2023-05-15 21:17:21 - SimpleLog - INFO: -      mp_backend     	       single       	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -      n_workers      	         1          	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -         seed        	         1          	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -        device       	        cpu         	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -     max_episode     	        100         	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -       max_step      	        200         	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -     online_eval     	         1          	   <class 'bool'>   
2023-05-15 21:17:21 - SimpleLog - INFO: - online_eval_episode 	         10         	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -   load_checkpoint   	         0          	   <class 'bool'>   
2023-05-15 21:17:21 - SimpleLog - INFO: -      load_path      	Train_CartPole-v1_DQN_20221026-054757	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -       show_fig      	         0          	   <class 'bool'>   
2023-05-15 21:17:21 - SimpleLog - INFO: -       save_fig      	         1          	   <class 'bool'>   
2023-05-15 21:17:21 - SimpleLog - INFO: -    model_save_fre   	        500         	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: - ================================================================================
2023-05-15 21:17:21 - SimpleLog - INFO: - Algo Configs:
2023-05-15 21:17:21 - SimpleLog - INFO: - ================================================================================
2023-05-15 21:17:21 - SimpleLog - INFO: -         Name        	       Value        	        Type        
2023-05-15 21:17:21 - SimpleLog - INFO: -    epsilon_start    	        0.95        	  <class 'float'>   
2023-05-15 21:17:21 - SimpleLog - INFO: -     epsilon_end     	        0.01        	  <class 'float'>   
2023-05-15 21:17:21 - SimpleLog - INFO: -    epsilon_decay    	        500         	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -        gamma        	        0.95        	  <class 'float'>   
2023-05-15 21:17:21 - SimpleLog - INFO: -          lr         	       0.0001       	  <class 'float'>   
2023-05-15 21:17:21 - SimpleLog - INFO: -     buffer_size     	       100000       	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -      batch_size     	         64         	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -    target_update    	         4          	   <class 'int'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -     value_layers    	[{'layer_type': 'linear', 'layer_dim': [256], 'activation': 'relu'}, {'layer_type': 'linear', 'layer_dim': [256], 'activation': 'relu'}]	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -     buffer_type     	     REPLAY_QUE     	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: - ================================================================================
2023-05-15 21:17:21 - SimpleLog - INFO: - Env Configs:
2023-05-15 21:17:21 - SimpleLog - INFO: - ================================================================================
2023-05-15 21:17:21 - SimpleLog - INFO: -         Name        	       Value        	        Type        
2023-05-15 21:17:21 - SimpleLog - INFO: -          id         	    CartPole-v1     	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -     render_mode     	        None        	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -       wrapper       	        None        	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: -    ignore_params    	['wrapper', 'ignore_params']	   <class 'str'>    
2023-05-15 21:17:21 - SimpleLog - INFO: - ================================================================================
2023-05-15 21:17:21 - SimpleLog - INFO: - obs_space: Box([-4.8000002e+00 -3.4028235e+38 -4.1887903e-01 -3.4028235e+38], [4.8000002e+00 3.4028235e+38 4.1887903e-01 3.4028235e+38], (4,), float32), n_actions: Discrete(2)
2023-05-15 21:17:21 - SimpleLog - INFO: - Start training!
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 0, ep_reward: 25.0, ep_step: 25
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 1, ep_reward: 10.0, ep_step: 10
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 2, ep_reward: 13.0, ep_step: 13
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 3, ep_reward: 11.0, ep_step: 11
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 4, ep_reward: 12.0, ep_step: 12
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 5, ep_reward: 20.0, ep_step: 20
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 6, ep_reward: 12.0, ep_step: 12
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 7, ep_reward: 12.0, ep_step: 12
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 8, ep_reward: 11.0, ep_step: 11
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 9, ep_reward: 14.0, ep_step: 14
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 10, ep_reward: 22.0, ep_step: 22
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 11, ep_reward: 14.0, ep_step: 14
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 12, ep_reward: 18.0, ep_step: 18
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 13, ep_reward: 10.0, ep_step: 10
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 14, ep_reward: 12.0, ep_step: 12
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 15, ep_reward: 13.0, ep_step: 13
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 16, ep_reward: 13.0, ep_step: 13
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 17, ep_reward: 19.0, ep_step: 19
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 18, ep_reward: 10.0, ep_step: 10
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 19, ep_reward: 11.0, ep_step: 11
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 20, ep_reward: 9.0, ep_step: 9
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 21, ep_reward: 12.0, ep_step: 12
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 22, ep_reward: 10.0, ep_step: 10
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 23, ep_reward: 13.0, ep_step: 13
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 24, ep_reward: 14.0, ep_step: 14
2023-05-15 21:17:21 - SimpleLog - INFO: - episode: 25, ep_reward: 20.0, ep_step: 20
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 26, ep_reward: 37.0, ep_step: 37
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 27, ep_reward: 15.0, ep_step: 15
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 28, ep_reward: 10.0, ep_step: 10
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 29, ep_reward: 11.0, ep_step: 11
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 30, ep_reward: 11.0, ep_step: 11
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 31, ep_reward: 11.0, ep_step: 11
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 32, ep_reward: 11.0, ep_step: 11
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 33, ep_reward: 12.0, ep_step: 12
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 34, ep_reward: 9.0, ep_step: 9
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 35, ep_reward: 9.0, ep_step: 9
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 36, ep_reward: 12.0, ep_step: 12
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 37, ep_reward: 9.0, ep_step: 9
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 38, ep_reward: 14.0, ep_step: 14
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 39, ep_reward: 13.0, ep_step: 13
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 40, ep_reward: 10.0, ep_step: 10
2023-05-15 21:17:22 - SimpleLog - INFO: - update_step: 500, online_eval_reward: 17.900
2023-05-15 21:17:22 - SimpleLog - INFO: - current update step obtain a better online_eval_reward: 17.900, save the best model!
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 41, ep_reward: 12.0, ep_step: 12
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 42, ep_reward: 19.0, ep_step: 19
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 43, ep_reward: 16.0, ep_step: 16
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 44, ep_reward: 14.0, ep_step: 14
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 45, ep_reward: 18.0, ep_step: 18
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 46, ep_reward: 24.0, ep_step: 24
2023-05-15 21:17:22 - SimpleLog - INFO: - episode: 47, ep_reward: 27.0, ep_step: 27
2023-05-15 21:17:23 - SimpleLog - INFO: - episode: 48, ep_reward: 27.0, ep_step: 27
2023-05-15 21:17:23 - SimpleLog - INFO: - episode: 49, ep_reward: 19.0, ep_step: 19
2023-05-15 21:17:23 - SimpleLog - INFO: - episode: 50, ep_reward: 20.0, ep_step: 20
2023-05-15 21:17:23 - SimpleLog - INFO: - episode: 51, ep_reward: 37.0, ep_step: 37
2023-05-15 21:17:23 - SimpleLog - INFO: - episode: 52, ep_reward: 26.0, ep_step: 26
2023-05-15 21:17:23 - SimpleLog - INFO: - episode: 53, ep_reward: 31.0, ep_step: 31
2023-05-15 21:17:23 - SimpleLog - INFO: - episode: 54, ep_reward: 23.0, ep_step: 23
2023-05-15 21:17:23 - SimpleLog - INFO: - episode: 55, ep_reward: 27.0, ep_step: 27
2023-05-15 21:17:23 - SimpleLog - INFO: - episode: 56, ep_reward: 35.0, ep_step: 35
2023-05-15 21:17:24 - SimpleLog - INFO: - episode: 57, ep_reward: 33.0, ep_step: 33
2023-05-15 21:17:24 - SimpleLog - INFO: - episode: 58, ep_reward: 24.0, ep_step: 24
2023-05-15 21:17:24 - SimpleLog - INFO: - episode: 59, ep_reward: 33.0, ep_step: 33
2023-05-15 21:17:24 - SimpleLog - INFO: - episode: 60, ep_reward: 36.0, ep_step: 36
2023-05-15 21:17:24 - SimpleLog - INFO: - update_step: 1000, online_eval_reward: 29.100
2023-05-15 21:17:24 - SimpleLog - INFO: - current update step obtain a better online_eval_reward: 29.100, save the best model!
2023-05-15 21:17:24 - SimpleLog - INFO: - episode: 61, ep_reward: 33.0, ep_step: 33
2023-05-15 21:17:24 - SimpleLog - INFO: - episode: 62, ep_reward: 34.0, ep_step: 34
2023-05-15 21:17:24 - SimpleLog - INFO: - episode: 63, ep_reward: 51.0, ep_step: 51
2023-05-15 21:17:24 - SimpleLog - INFO: - episode: 64, ep_reward: 41.0, ep_step: 41
2023-05-15 21:17:25 - SimpleLog - INFO: - episode: 65, ep_reward: 54.0, ep_step: 54
2023-05-15 21:17:25 - SimpleLog - INFO: - episode: 66, ep_reward: 54.0, ep_step: 54
2023-05-15 21:17:25 - SimpleLog - INFO: - episode: 67, ep_reward: 74.0, ep_step: 74
2023-05-15 21:17:25 - SimpleLog - INFO: - episode: 68, ep_reward: 44.0, ep_step: 44
2023-05-15 21:17:25 - SimpleLog - INFO: - episode: 69, ep_reward: 38.0, ep_step: 38
2023-05-15 21:17:25 - SimpleLog - INFO: - episode: 70, ep_reward: 49.0, ep_step: 49
2023-05-15 21:17:26 - SimpleLog - INFO: - update_step: 1500, online_eval_reward: 57.300
2023-05-15 21:17:26 - SimpleLog - INFO: - current update step obtain a better online_eval_reward: 57.300, save the best model!
2023-05-15 21:17:26 - SimpleLog - INFO: - episode: 71, ep_reward: 64.0, ep_step: 64
2023-05-15 21:17:26 - SimpleLog - INFO: - episode: 72, ep_reward: 89.0, ep_step: 89
2023-05-15 21:17:26 - SimpleLog - INFO: - episode: 73, ep_reward: 90.0, ep_step: 90
2023-05-15 21:17:26 - SimpleLog - INFO: - episode: 74, ep_reward: 66.0, ep_step: 66
2023-05-15 21:17:27 - SimpleLog - INFO: - episode: 75, ep_reward: 60.0, ep_step: 60
2023-05-15 21:17:27 - SimpleLog - INFO: - episode: 76, ep_reward: 66.0, ep_step: 66
2023-05-15 21:17:27 - SimpleLog - INFO: - episode: 77, ep_reward: 67.0, ep_step: 67
2023-05-15 21:17:27 - SimpleLog - INFO: - update_step: 2000, online_eval_reward: 91.800
2023-05-15 21:17:27 - SimpleLog - INFO: - current update step obtain a better online_eval_reward: 91.800, save the best model!
2023-05-15 21:17:27 - SimpleLog - INFO: - episode: 78, ep_reward: 141.0, ep_step: 141
2023-05-15 21:17:28 - SimpleLog - INFO: - episode: 79, ep_reward: 138.0, ep_step: 138
2023-05-15 21:17:28 - SimpleLog - INFO: - episode: 80, ep_reward: 141.0, ep_step: 141
2023-05-15 21:17:29 - SimpleLog - INFO: - update_step: 2500, online_eval_reward: 178.900
2023-05-15 21:17:29 - SimpleLog - INFO: - current update step obtain a better online_eval_reward: 178.900, save the best model!
2023-05-15 21:17:29 - SimpleLog - INFO: - episode: 81, ep_reward: 192.0, ep_step: 192
2023-05-15 21:17:30 - SimpleLog - INFO: - episode: 82, ep_reward: 163.0, ep_step: 163
2023-05-15 21:17:31 - SimpleLog - INFO: - episode: 83, ep_reward: 183.0, ep_step: 183
2023-05-15 21:17:31 - SimpleLog - INFO: - update_step: 3000, online_eval_reward: 165.900
2023-05-15 21:17:31 - SimpleLog - INFO: - episode: 84, ep_reward: 199.0, ep_step: 199
2023-05-15 21:17:32 - SimpleLog - INFO: - episode: 85, ep_reward: 175.0, ep_step: 175
2023-05-15 21:17:32 - SimpleLog - INFO: - episode: 86, ep_reward: 191.0, ep_step: 191
2023-05-15 21:17:33 - SimpleLog - INFO: - update_step: 3500, online_eval_reward: 186.300
2023-05-15 21:17:33 - SimpleLog - INFO: - current update step obtain a better online_eval_reward: 186.300, save the best model!
2023-05-15 21:17:33 - SimpleLog - INFO: - episode: 87, ep_reward: 180.0, ep_step: 180
2023-05-15 21:17:34 - SimpleLog - INFO: - episode: 88, ep_reward: 185.0, ep_step: 185
2023-05-15 21:17:35 - SimpleLog - INFO: - update_step: 4000, online_eval_reward: 187.300
2023-05-15 21:17:35 - SimpleLog - INFO: - current update step obtain a better online_eval_reward: 187.300, save the best model!
2023-05-15 21:17:35 - SimpleLog - INFO: - episode: 89, ep_reward: 194.0, ep_step: 194
2023-05-15 21:17:35 - SimpleLog - INFO: - episode: 90, ep_reward: 181.0, ep_step: 181
2023-05-15 21:17:36 - SimpleLog - INFO: - episode: 91, ep_reward: 200.0, ep_step: 200
2023-05-15 21:17:36 - SimpleLog - INFO: - update_step: 4500, online_eval_reward: 197.500
2023-05-15 21:17:36 - SimpleLog - INFO: - current update step obtain a better online_eval_reward: 197.500, save the best model!
2023-05-15 21:17:37 - SimpleLog - INFO: - episode: 92, ep_reward: 200.0, ep_step: 200
2023-05-15 21:17:37 - SimpleLog - INFO: - episode: 93, ep_reward: 200.0, ep_step: 200
2023-05-15 21:17:38 - SimpleLog - INFO: - update_step: 5000, online_eval_reward: 196.200
2023-05-15 21:17:38 - SimpleLog - INFO: - episode: 94, ep_reward: 200.0, ep_step: 200
2023-05-15 21:17:39 - SimpleLog - INFO: - episode: 95, ep_reward: 200.0, ep_step: 200
2023-05-15 21:17:39 - SimpleLog - INFO: - episode: 96, ep_reward: 200.0, ep_step: 200
2023-05-15 21:17:40 - SimpleLog - INFO: - update_step: 5500, online_eval_reward: 199.500
2023-05-15 21:17:40 - SimpleLog - INFO: - current update step obtain a better online_eval_reward: 199.500, save the best model!
2023-05-15 21:17:40 - SimpleLog - INFO: - episode: 97, ep_reward: 200.0, ep_step: 200
2023-05-15 21:17:41 - SimpleLog - INFO: - episode: 98, ep_reward: 200.0, ep_step: 200
2023-05-15 21:17:42 - SimpleLog - INFO: - update_step: 6000, online_eval_reward: 196.200
2023-05-15 21:17:42 - SimpleLog - INFO: - episode: 99, ep_reward: 200.0, ep_step: 200
2023-05-15 21:17:42 - SimpleLog - INFO: - Finish training! total time consumed: 21.14s