jrnold commited on
Commit
5763b98
·
1 Parent(s): 29e7bbe

First Push

Browse files
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - unity-ml-agents
5
+ - ml-agents
6
+ - deep-reinforcement-learning
7
+ - reinforcement-learning
8
+ - ML-Agents-SoccerTwos
9
+ library_name: ml-agents
10
+ ---
11
+
12
+ # **poca** Agent playing **SoccerTwos**
13
+ This is a trained model of a **poca** agent playing **SoccerTwos** using the [Unity ML-Agents Library](https://github.com/Unity-Technologies/ml-agents).
14
+
15
+ ## Usage (with ML-Agents)
16
+ The Documentation: https://github.com/huggingface/ml-agents#get-started
17
+ We wrote a complete tutorial to learn to train your first agent using ML-Agents and publish it to the Hub:
18
+
19
+
20
+ ### Resume the training
21
+ ```
22
+ mlagents-learn <your_configuration_file_path.yaml> --run-id=<run_id> --resume
23
+ ```
24
+ ### Watch your Agent play
25
+ You can watch your agent **playing directly in your browser:**.
26
+
27
+ 1. Go to https://huggingface.co/spaces/unity/ML-Agents-SoccerTwos
28
+ 2. Step 1: Write your model_id: jrnold/poca-SoccerTwos
29
+ 3. Step 2: Select your *.nn /*.onnx file
30
+ 4. Click on Watch the agent play 👀
31
+
SoccerTwos.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6d47e680afa63d937587db75c361afabdec858097ba729ce7f2db3a81f0763b
3
+ size 1763220
SoccerTwos/SoccerTwos-15566.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6d47e680afa63d937587db75c361afabdec858097ba729ce7f2db3a81f0763b
3
+ size 1763220
SoccerTwos/SoccerTwos-15566.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35b18dee2d7949cbb22360e6e480296782ddb38464d5a4560f2ab3706fbc5ac9
3
+ size 9479511
SoccerTwos/SoccerTwos-16999918.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1370b003ec759dd4ba55438bc9251acd64b7fbf0c159f143afa56beafcbd573f
3
+ size 1763220
SoccerTwos/SoccerTwos-16999918.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba73348d6a4c2b052958534e84e20aa1d14c1d08831fb38989d178c0f315123a
3
+ size 28424007
SoccerTwos/SoccerTwos-17499910.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8042b167e2205cb6b860b9013004f35ddaa16e6a0d69423b9fd7484a2d071c7f
3
+ size 1763220
SoccerTwos/SoccerTwos-17499910.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a424fd7a09b9bbb1292a222ec41a6f4d75069202bc1f57c6ee6c0fd3ebbd7213
3
+ size 28424007
SoccerTwos/SoccerTwos-17999975.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca0d1158edfa06ca491324376d2788ccd8bca09a42460a44800b163a38e84a02
3
+ size 1763220
SoccerTwos/SoccerTwos-17999975.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2566f88f032f43498d6c8dc1e1164522aa9d72a640ea3b9f9e76c1216010e950
3
+ size 28424007
SoccerTwos/SoccerTwos-18499994.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:923ddff90c7abb93a9144b40f39c9a943330d5e41451baefa34ab5d24bd123fe
3
+ size 1763220
SoccerTwos/SoccerTwos-18499994.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56a589953efc4b0a206e424e90a72681221d405fc6beb7ef413adcebea94f822
3
+ size 28424007
SoccerTwos/SoccerTwos-18999990.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47c53d93431c7b9831c39262fb3b91c5e61ebedbe5109f1c6de6b3ff234a668c
3
+ size 1763220
SoccerTwos/SoccerTwos-18999990.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8da0003bc56cede23b045693cc236c6c0db1b1495fa99d4e545e7b358b9c3039
3
+ size 28424007
SoccerTwos/checkpoint.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8da0003bc56cede23b045693cc236c6c0db1b1495fa99d4e545e7b358b9c3039
3
+ size 28424007
SoccerTwos/events.out.tfevents.1675834640.Jeffreys-MacBook-Pro-2.local.21533.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:994f5ce451658588bd6e055a05f01beabb99c207d5427123f1414c718107e7d8
3
+ size 19756895
config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default_settings": null, "behaviors": {"SoccerTwos": {"trainer_type": "poca", "hyperparameters": {"batch_size": 2048, "buffer_size": 20480, "learning_rate": 0.0003, "beta": 0.005, "epsilon": 0.2, "lambd": 0.95, "num_epoch": 3, "learning_rate_schedule": "constant", "beta_schedule": "constant", "epsilon_schedule": "constant"}, "checkpoint_interval": 500000, "network_settings": {"normalize": false, "hidden_units": 512, "num_layers": 2, "vis_encode_type": "simple", "memory": null, "goal_conditioning_type": "hyper", "deterministic": false}, "reward_signals": {"extrinsic": {"gamma": 0.99, "strength": 1.0, "network_settings": {"normalize": false, "hidden_units": 128, "num_layers": 2, "vis_encode_type": "simple", "memory": null, "goal_conditioning_type": "hyper", "deterministic": false}}}, "init_path": null, "keep_checkpoints": 5, "even_checkpoints": false, "max_steps": 10000, "time_horizon": 1000, "summary_freq": 10000, "threaded": false, "self_play": {"save_steps": 50000, "team_change": 200000, "swap_steps": 2000, "window": 10, "play_against_latest_model_ratio": 0.5, "initial_elo": 1200.0}, "behavioral_cloning": null}}, "env_settings": {"env_path": "./training-envs-executables/SoccerTwos/SoccerTwos.app", "env_args": null, "base_port": 5005, "num_envs": 1, "num_areas": 1, "seed": -1, "max_lifetime_restarts": 10, "restarts_rate_limit_n": 1, "restarts_rate_limit_period_s": 60}, "engine_settings": {"width": 84, "height": 84, "quality_level": 5, "time_scale": 20, "target_frame_rate": -1, "capture_frame_rate": 60, "no_graphics": true}, "environment_parameters": null, "checkpoint_settings": {"run_id": "SoccerTwos", "initialize_from": null, "load_model": false, "resume": false, "force": true, "train_model": false, "inference": false, "results_dir": "results"}, "torch_settings": {"device": null}, "debug": false}
configuration.yaml ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_settings: null
2
+ behaviors:
3
+ SoccerTwos:
4
+ trainer_type: poca
5
+ hyperparameters:
6
+ batch_size: 2048
7
+ buffer_size: 20480
8
+ learning_rate: 0.0003
9
+ beta: 0.005
10
+ epsilon: 0.2
11
+ lambd: 0.95
12
+ num_epoch: 3
13
+ learning_rate_schedule: constant
14
+ beta_schedule: constant
15
+ epsilon_schedule: constant
16
+ checkpoint_interval: 500000
17
+ network_settings:
18
+ normalize: false
19
+ hidden_units: 512
20
+ num_layers: 2
21
+ vis_encode_type: simple
22
+ memory: null
23
+ goal_conditioning_type: hyper
24
+ deterministic: false
25
+ reward_signals:
26
+ extrinsic:
27
+ gamma: 0.99
28
+ strength: 1.0
29
+ network_settings:
30
+ normalize: false
31
+ hidden_units: 128
32
+ num_layers: 2
33
+ vis_encode_type: simple
34
+ memory: null
35
+ goal_conditioning_type: hyper
36
+ deterministic: false
37
+ init_path: null
38
+ keep_checkpoints: 5
39
+ even_checkpoints: false
40
+ max_steps: 10000
41
+ time_horizon: 1000
42
+ summary_freq: 10000
43
+ threaded: false
44
+ self_play:
45
+ save_steps: 50000
46
+ team_change: 200000
47
+ swap_steps: 2000
48
+ window: 10
49
+ play_against_latest_model_ratio: 0.5
50
+ initial_elo: 1200.0
51
+ behavioral_cloning: null
52
+ env_settings:
53
+ env_path: ./training-envs-executables/SoccerTwos/SoccerTwos.app
54
+ env_args: null
55
+ base_port: 5005
56
+ num_envs: 1
57
+ num_areas: 1
58
+ seed: -1
59
+ max_lifetime_restarts: 10
60
+ restarts_rate_limit_n: 1
61
+ restarts_rate_limit_period_s: 60
62
+ engine_settings:
63
+ width: 84
64
+ height: 84
65
+ quality_level: 5
66
+ time_scale: 20
67
+ target_frame_rate: -1
68
+ capture_frame_rate: 60
69
+ no_graphics: true
70
+ environment_parameters: null
71
+ checkpoint_settings:
72
+ run_id: SoccerTwos
73
+ initialize_from: null
74
+ load_model: false
75
+ resume: false
76
+ force: true
77
+ train_model: false
78
+ inference: false
79
+ results_dir: results
80
+ torch_settings:
81
+ device: null
82
+ debug: false
run_logs/timers.json ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "root",
3
+ "gauges": {
4
+ "SoccerTwos.Policy.Entropy.mean": {
5
+ "value": 3.295684576034546,
6
+ "min": 3.295684576034546,
7
+ "max": 3.295684576034546,
8
+ "count": 1
9
+ },
10
+ "SoccerTwos.Policy.Entropy.sum": {
11
+ "value": 105461.90625,
12
+ "min": 105461.90625,
13
+ "max": 105461.90625,
14
+ "count": 1
15
+ },
16
+ "SoccerTwos.Environment.EpisodeLength.mean": {
17
+ "value": 971.875,
18
+ "min": 971.875,
19
+ "max": 971.875,
20
+ "count": 1
21
+ },
22
+ "SoccerTwos.Environment.EpisodeLength.sum": {
23
+ "value": 31100.0,
24
+ "min": 31100.0,
25
+ "max": 31100.0,
26
+ "count": 1
27
+ },
28
+ "SoccerTwos.Self-play.ELO.mean": {
29
+ "value": 1200.7492804441454,
30
+ "min": 1200.7492804441454,
31
+ "max": 1200.7492804441454,
32
+ "count": 1
33
+ },
34
+ "SoccerTwos.Self-play.ELO.sum": {
35
+ "value": 2401.4985608882907,
36
+ "min": 2401.4985608882907,
37
+ "max": 2401.4985608882907,
38
+ "count": 1
39
+ },
40
+ "SoccerTwos.Step.mean": {
41
+ "value": 9566.0,
42
+ "min": 9566.0,
43
+ "max": 9566.0,
44
+ "count": 1
45
+ },
46
+ "SoccerTwos.Step.sum": {
47
+ "value": 9566.0,
48
+ "min": 9566.0,
49
+ "max": 9566.0,
50
+ "count": 1
51
+ },
52
+ "SoccerTwos.Policy.ExtrinsicBaselineEstimate.mean": {
53
+ "value": -0.007814358919858932,
54
+ "min": -0.007814358919858932,
55
+ "max": -0.007814358919858932,
56
+ "count": 1
57
+ },
58
+ "SoccerTwos.Policy.ExtrinsicBaselineEstimate.sum": {
59
+ "value": -0.07814358919858932,
60
+ "min": -0.07814358919858932,
61
+ "max": -0.07814358919858932,
62
+ "count": 1
63
+ },
64
+ "SoccerTwos.Policy.ExtrinsicValueEstimate.mean": {
65
+ "value": -0.007726958952844143,
66
+ "min": -0.007726958952844143,
67
+ "max": -0.007726958952844143,
68
+ "count": 1
69
+ },
70
+ "SoccerTwos.Policy.ExtrinsicValueEstimate.sum": {
71
+ "value": -0.07726959139108658,
72
+ "min": -0.07726959139108658,
73
+ "max": -0.07726959139108658,
74
+ "count": 1
75
+ },
76
+ "SoccerTwos.Environment.CumulativeReward.mean": {
77
+ "value": 0.0,
78
+ "min": 0.0,
79
+ "max": 0.0,
80
+ "count": 1
81
+ },
82
+ "SoccerTwos.Environment.CumulativeReward.sum": {
83
+ "value": 0.0,
84
+ "min": 0.0,
85
+ "max": 0.0,
86
+ "count": 1
87
+ },
88
+ "SoccerTwos.Policy.ExtrinsicReward.mean": {
89
+ "value": 0.04343999922275543,
90
+ "min": 0.04343999922275543,
91
+ "max": 0.04343999922275543,
92
+ "count": 1
93
+ },
94
+ "SoccerTwos.Policy.ExtrinsicReward.sum": {
95
+ "value": 0.4343999922275543,
96
+ "min": 0.4343999922275543,
97
+ "max": 0.4343999922275543,
98
+ "count": 1
99
+ },
100
+ "SoccerTwos.Environment.GroupCumulativeReward.mean": {
101
+ "value": 0.04343999922275543,
102
+ "min": 0.04343999922275543,
103
+ "max": 0.04343999922275543,
104
+ "count": 1
105
+ },
106
+ "SoccerTwos.Environment.GroupCumulativeReward.sum": {
107
+ "value": 0.4343999922275543,
108
+ "min": 0.4343999922275543,
109
+ "max": 0.4343999922275543,
110
+ "count": 1
111
+ },
112
+ "SoccerTwos.IsTraining.mean": {
113
+ "value": 1.0,
114
+ "min": 1.0,
115
+ "max": 1.0,
116
+ "count": 1
117
+ },
118
+ "SoccerTwos.IsTraining.sum": {
119
+ "value": 1.0,
120
+ "min": 1.0,
121
+ "max": 1.0,
122
+ "count": 1
123
+ }
124
+ },
125
+ "metadata": {
126
+ "timer_format_version": "0.1.0",
127
+ "start_time_seconds": "1675834207",
128
+ "python_version": "3.8.16 (default, Jan 17 2023, 16:42:09) \n[Clang 14.0.6 ]",
129
+ "command_line_arguments": "/Users/jrnold/.pyenv/versions/mambaforge/envs/rl/bin/mlagents-learn ./config/poca/SoccerTwos.yaml --env=./training-envs-executables/SoccerTwos/SoccerTwos.app --run-id=SoccerTwos --no-graphics --force",
130
+ "mlagents_version": "0.31.0.dev0",
131
+ "mlagents_envs_version": "0.31.0.dev0",
132
+ "communication_protocol_version": "1.5.0",
133
+ "pytorch_version": "1.8.1",
134
+ "numpy_version": "1.21.2",
135
+ "end_time_seconds": "1675834231"
136
+ },
137
+ "total": 24.360340010999998,
138
+ "count": 1,
139
+ "self": 0.39096425700000026,
140
+ "children": {
141
+ "run_training.setup": {
142
+ "total": 0.062021694000000016,
143
+ "count": 1,
144
+ "self": 0.062021694000000016
145
+ },
146
+ "TrainerController.start_learning": {
147
+ "total": 23.90735406,
148
+ "count": 1,
149
+ "self": 0.02115698399999033,
150
+ "children": {
151
+ "TrainerController._reset_env": {
152
+ "total": 4.128362879,
153
+ "count": 1,
154
+ "self": 4.128362879
155
+ },
156
+ "TrainerController.advance": {
157
+ "total": 19.576662858000006,
158
+ "count": 1001,
159
+ "self": 0.02241945900000175,
160
+ "children": {
161
+ "env_step": {
162
+ "total": 14.936388841999996,
163
+ "count": 1001,
164
+ "self": 12.088677863999937,
165
+ "children": {
166
+ "SubprocessEnvManager._take_step": {
167
+ "total": 2.8336093740000132,
168
+ "count": 1001,
169
+ "self": 0.11841361199992662,
170
+ "children": {
171
+ "TorchPolicy.evaluate": {
172
+ "total": 2.7151957620000866,
173
+ "count": 2000,
174
+ "self": 2.7151957620000866
175
+ }
176
+ }
177
+ },
178
+ "workers": {
179
+ "total": 0.014101604000046564,
180
+ "count": 1001,
181
+ "self": 0.0,
182
+ "children": {
183
+ "worker_root": {
184
+ "total": 15.600958393999996,
185
+ "count": 1001,
186
+ "is_parallel": true,
187
+ "self": 5.729921020999935,
188
+ "children": {
189
+ "steps_from_proto": {
190
+ "total": 0.003751954999999363,
191
+ "count": 2,
192
+ "is_parallel": true,
193
+ "self": 0.0006619229999991205,
194
+ "children": {
195
+ "_process_rank_one_or_two_observation": {
196
+ "total": 0.0030900320000002424,
197
+ "count": 8,
198
+ "is_parallel": true,
199
+ "self": 0.0030900320000002424
200
+ }
201
+ }
202
+ },
203
+ "UnityEnvironment.step": {
204
+ "total": 9.867285418000062,
205
+ "count": 1001,
206
+ "is_parallel": true,
207
+ "self": 0.5009040660000927,
208
+ "children": {
209
+ "UnityEnvironment._generate_step_input": {
210
+ "total": 0.3315615400000018,
211
+ "count": 1001,
212
+ "is_parallel": true,
213
+ "self": 0.3315615400000018
214
+ },
215
+ "communicator.exchange": {
216
+ "total": 7.466221223999969,
217
+ "count": 1001,
218
+ "is_parallel": true,
219
+ "self": 7.466221223999969
220
+ },
221
+ "steps_from_proto": {
222
+ "total": 1.5685985879999995,
223
+ "count": 2002,
224
+ "is_parallel": true,
225
+ "self": 0.31877567899988346,
226
+ "children": {
227
+ "_process_rank_one_or_two_observation": {
228
+ "total": 1.249822909000116,
229
+ "count": 8008,
230
+ "is_parallel": true,
231
+ "self": 1.249822909000116
232
+ }
233
+ }
234
+ }
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+ }
241
+ }
242
+ },
243
+ "trainer_advance": {
244
+ "total": 4.617854557000007,
245
+ "count": 1001,
246
+ "self": 0.10161975499998288,
247
+ "children": {
248
+ "process_trajectory": {
249
+ "total": 4.5162348020000245,
250
+ "count": 1001,
251
+ "self": 4.5162348020000245
252
+ }
253
+ }
254
+ }
255
+ }
256
+ },
257
+ "trainer_threads": {
258
+ "total": 1.0560000021087035e-06,
259
+ "count": 1,
260
+ "self": 1.0560000021087035e-06
261
+ },
262
+ "TrainerController._save_models": {
263
+ "total": 0.18117028300000015,
264
+ "count": 1,
265
+ "self": 0.0015677130000000261,
266
+ "children": {
267
+ "RLTrainer._checkpoint": {
268
+ "total": 0.17960257000000013,
269
+ "count": 1,
270
+ "self": 0.17960257000000013
271
+ }
272
+ }
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
run_logs/training_status.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "SoccerTwos": {
3
+ "elo": 1200.9985608882907,
4
+ "checkpoints": [
5
+ {
6
+ "steps": 15566,
7
+ "file_path": "results/SoccerTwos/SoccerTwos/SoccerTwos-15566.onnx",
8
+ "reward": 0.0,
9
+ "creation_time": 1675834231.506451,
10
+ "auxillary_file_paths": [
11
+ "results/SoccerTwos/SoccerTwos/SoccerTwos-15566.pt"
12
+ ]
13
+ }
14
+ ],
15
+ "final_checkpoint": {
16
+ "steps": 15566,
17
+ "file_path": "results/SoccerTwos/SoccerTwos.onnx",
18
+ "reward": 0.0,
19
+ "creation_time": 1675834231.506451,
20
+ "auxillary_file_paths": [
21
+ "results/SoccerTwos/SoccerTwos/SoccerTwos-15566.pt"
22
+ ]
23
+ }
24
+ },
25
+ "metadata": {
26
+ "stats_format_version": "0.3.0",
27
+ "mlagents_version": "0.31.0.dev0",
28
+ "torch_version": "1.8.1"
29
+ }
30
+ }