tsfeith commited on
Commit
7a358f9
1 Parent(s): 9cb166f

First Push`

Browse files
README.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: ml-agents
3
+ tags:
4
+ - SoccerTwos
5
+ - deep-reinforcement-learning
6
+ - reinforcement-learning
7
+ - ML-Agents-SoccerTwos
8
+ ---
9
+
10
+ # **poca** Agent playing **SoccerTwos**
11
+ This is a trained model of a **poca** agent playing **SoccerTwos**
12
+ using the [Unity ML-Agents Library](https://github.com/Unity-Technologies/ml-agents).
13
+
14
+ ## Usage (with ML-Agents)
15
+ The Documentation: https://unity-technologies.github.io/ml-agents/ML-Agents-Toolkit-Documentation/
16
+
17
+ We wrote a complete tutorial to learn to train your first agent using ML-Agents and publish it to the Hub:
18
+ - A *short tutorial* where you teach Huggy the Dog 🐶 to fetch the stick and then play with him directly in your
19
+ browser: https://huggingface.co/learn/deep-rl-course/unitbonus1/introduction
20
+ - A *longer tutorial* to understand how works ML-Agents:
21
+ https://huggingface.co/learn/deep-rl-course/unit5/introduction
22
+
23
+ ### Resume the training
24
+ ```bash
25
+ mlagents-learn <your_configuration_file_path.yaml> --run-id=<run_id> --resume
26
+ ```
27
+
28
+ ### Watch your Agent play
29
+ You can watch your agent **playing directly in your browser**
30
+
31
+ 1. If the environment is part of ML-Agents official environments, go to https://huggingface.co/unity
32
+ 2. Step 1: Find your model_id: tsfeith/poca-SoccerTwos
33
+ 3. Step 2: Select your *.nn /*.onnx file
34
+ 4. Click on Watch the agent play 👀
35
+
SoccerTwos.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a457035c5f20ea0a4b5433659727889d3fc71068c126166b523f5d97929bf875
3
+ size 1766876
SoccerTwos/SoccerTwos-484.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a457035c5f20ea0a4b5433659727889d3fc71068c126166b523f5d97929bf875
3
+ size 1766876
SoccerTwos/SoccerTwos-484.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb19aa9479a394f34f318805dc7cf2784ade1e37a3ce9d155d9b271bd90274a7
3
+ size 9479362
SoccerTwos/checkpoint.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:059eb1af0b950f83020216c56ff3bf3e3a85a8c4943293ec177e2d6a6455dba4
3
+ size 9479202
SoccerTwos/events.out.tfevents.1709290975.LAPTOP-V08DRENB.7532.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c501a2213f0f752ec9feb73f67e1e820ffc6cb8b5f6662ff286cb9a67edf25c9
3
+ size 27190
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": 5000000, "time_horizon": 1000, "summary_freq": 10000, "threaded": false, "self_play": {"save_steps": 20000, "team_change": 100000, "swap_steps": 25000, "window": 10, "play_against_latest_model_ratio": 0.5, "initial_elo": 1200.0}, "behavioral_cloning": null}}, "env_settings": {"env_path": "./training-envs-executables/SoccerTwos.exe", "env_args": null, "base_port": 5005, "num_envs": 1, "num_areas": 1, "timeout_wait": 60, "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, "no_graphics_monitor": false}, "environment_parameters": null, "checkpoint_settings": {"run_id": "SoccerTwos", "initialize_from": null, "load_model": false, "resume": false, "force": false, "train_model": false, "inference": false, "results_dir": "results"}, "torch_settings": {"device": null}, "debug": false}
configuration.yaml ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 5000000
41
+ time_horizon: 1000
42
+ summary_freq: 10000
43
+ threaded: false
44
+ self_play:
45
+ save_steps: 20000
46
+ team_change: 100000
47
+ swap_steps: 25000
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.exe
54
+ env_args: null
55
+ base_port: 5005
56
+ num_envs: 1
57
+ num_areas: 1
58
+ timeout_wait: 60
59
+ seed: -1
60
+ max_lifetime_restarts: 10
61
+ restarts_rate_limit_n: 1
62
+ restarts_rate_limit_period_s: 60
63
+ engine_settings:
64
+ width: 84
65
+ height: 84
66
+ quality_level: 5
67
+ time_scale: 20
68
+ target_frame_rate: -1
69
+ capture_frame_rate: 60
70
+ no_graphics: true
71
+ no_graphics_monitor: false
72
+ environment_parameters: null
73
+ checkpoint_settings:
74
+ run_id: SoccerTwos
75
+ initialize_from: null
76
+ load_model: false
77
+ resume: false
78
+ force: false
79
+ train_model: false
80
+ inference: false
81
+ results_dir: results
82
+ torch_settings:
83
+ device: null
84
+ debug: false
run_logs/Player-0.log ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Mono path[0] = 'C:/Users/tsfei/Desktop/ml-agents/training-envs-executables/SoccerTwos/SoccerTwos_Data/Managed'
2
+ Mono config path = 'C:/Users/tsfei/Desktop/ml-agents/training-envs-executables/SoccerTwos/MonoBleedingEdge/etc'
3
+ Initialize engine version: 2021.3.14f1 (eee1884e7226)
4
+ [Subsystems] Discovering subsystems at path C:/Users/tsfei/Desktop/ml-agents/training-envs-executables/SoccerTwos/SoccerTwos_Data/UnitySubsystems
5
+ Forcing GfxDevice: Null
6
+ GfxDevice: creating device client; threaded=0; jobified=0
7
+ NullGfxDevice:
8
+ Version: NULL 1.0 [1.0]
9
+ Renderer: Null Device
10
+ Vendor: Unity Technologies
11
+ Begin MonoManager ReloadAssembly
12
+ - Completed reload, in 0.289 seconds
13
+ ERROR: Shader Sprites/Default shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
14
+ Microsoft Media Foundation video decoding to texture disabled: graphics device is Null, only Direct3D 11 and Direct3D 12 (only on desktop) are supported for hardware-accelerated video decoding.
15
+ ERROR: Shader Sprites/Mask shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
16
+ ERROR: Shader Legacy Shaders/VertexLit shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
17
+ WARNING: Shader Unsupported: 'Standard (Specular setup)' - All subshaders removed
18
+ WARNING: Shader Did you use #pragma only_renderers and omit this platform?
19
+ WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
20
+ ERROR: Shader Standard (Specular setup) shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
21
+ WARNING: Shader Unsupported: 'Standard (Specular setup)' - All subshaders removed
22
+ WARNING: Shader Did you use #pragma only_renderers and omit this platform?
23
+ WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
24
+ WARNING: Shader Unsupported: 'Autodesk Interactive' - All subshaders removed
25
+ WARNING: Shader Did you use #pragma only_renderers and omit this platform?
26
+ WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
27
+ ERROR: Shader Autodesk Interactive shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
28
+ WARNING: Shader Unsupported: 'Autodesk Interactive' - All subshaders removed
29
+ WARNING: Shader Did you use #pragma only_renderers and omit this platform?
30
+ WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
31
+ WARNING: Shader Unsupported: 'Standard' - All subshaders removed
32
+ WARNING: Shader Did you use #pragma only_renderers and omit this platform?
33
+ WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
34
+ ERROR: Shader Standard shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
35
+ WARNING: Shader Unsupported: 'Standard' - All subshaders removed
36
+ WARNING: Shader Did you use #pragma only_renderers and omit this platform?
37
+ WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
38
+ UnloadTime: 1.378200 ms
39
+ Registered Communicator in Agent.
40
+ ERROR: Shader UI/Default shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
41
+ TOO LONG
42
+ TOO LONG
43
+ TOO LONG
44
+ TOO LONG
45
+ TOO LONG
46
+ TOO LONG
47
+ TOO LONG
48
+ TOO LONG
49
+ TOO LONG
50
+ TOO LONG
51
+ TOO LONG
52
+ TOO LONG
53
+ TOO LONG
54
+ TOO LONG
55
+ TOO LONG
56
+ TOO LONG
57
+ TOO LONG
run_logs/timers.json ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "root",
3
+ "metadata": {
4
+ "timer_format_version": "0.1.0",
5
+ "start_time_seconds": "1709290882",
6
+ "python_version": "3.10.12 | packaged by Anaconda, Inc. | (main, Jul 5 2023, 19:01:18) [MSC v.1916 64 bit (AMD64)]",
7
+ "command_line_arguments": "\\\\?\\C:\\Users\\tsfei\\anaconda3\\envs\\rl\\Scripts\\mlagents-learn ./config/poca/SoccerTwos.yaml --env=./training-envs-executables/SoccerTwos.exe --run-id=SoccerTwos --no-graphics",
8
+ "mlagents_version": "1.1.0.dev0",
9
+ "mlagents_envs_version": "1.1.0.dev0",
10
+ "communication_protocol_version": "1.5.0",
11
+ "pytorch_version": "2.2.1+cpu",
12
+ "numpy_version": "1.23.5",
13
+ "end_time_seconds": "1709290912"
14
+ },
15
+ "total": 29.524235200020485,
16
+ "count": 1,
17
+ "self": 4.274449199903756,
18
+ "children": {
19
+ "run_training.setup": {
20
+ "total": 0.24844530003610998,
21
+ "count": 1,
22
+ "self": 0.24844530003610998
23
+ },
24
+ "TrainerController.start_learning": {
25
+ "total": 25.00134070008062,
26
+ "count": 1,
27
+ "self": 0.01991499902214855,
28
+ "children": {
29
+ "TrainerController._reset_env": {
30
+ "total": 8.056637300061993,
31
+ "count": 1,
32
+ "self": 8.056637300061993
33
+ },
34
+ "TrainerController.advance": {
35
+ "total": 16.669975800905377,
36
+ "count": 523,
37
+ "self": 0.021563803777098656,
38
+ "children": {
39
+ "env_step": {
40
+ "total": 16.3210058985278,
41
+ "count": 523,
42
+ "self": 12.615001202910207,
43
+ "children": {
44
+ "SubprocessEnvManager._take_step": {
45
+ "total": 3.6937427977100015,
46
+ "count": 523,
47
+ "self": 0.13225159782450646,
48
+ "children": {
49
+ "TorchPolicy.evaluate": {
50
+ "total": 3.561491199885495,
51
+ "count": 1042,
52
+ "self": 3.561491199885495
53
+ }
54
+ }
55
+ },
56
+ "workers": {
57
+ "total": 0.012261897907592356,
58
+ "count": 522,
59
+ "self": 0.0,
60
+ "children": {
61
+ "worker_root": {
62
+ "total": 18.622069598874077,
63
+ "count": 522,
64
+ "is_parallel": true,
65
+ "self": 8.756487997132353,
66
+ "children": {
67
+ "steps_from_proto": {
68
+ "total": 0.0072839000495150685,
69
+ "count": 2,
70
+ "is_parallel": true,
71
+ "self": 0.0014364002272486687,
72
+ "children": {
73
+ "_process_rank_one_or_two_observation": {
74
+ "total": 0.0058474998222664,
75
+ "count": 8,
76
+ "is_parallel": true,
77
+ "self": 0.0058474998222664
78
+ }
79
+ }
80
+ },
81
+ "UnityEnvironment.step": {
82
+ "total": 9.858297701692209,
83
+ "count": 522,
84
+ "is_parallel": true,
85
+ "self": 0.5354730035178363,
86
+ "children": {
87
+ "UnityEnvironment._generate_step_input": {
88
+ "total": 0.6396330007119104,
89
+ "count": 522,
90
+ "is_parallel": true,
91
+ "self": 0.6396330007119104
92
+ },
93
+ "communicator.exchange": {
94
+ "total": 7.008184298523702,
95
+ "count": 522,
96
+ "is_parallel": true,
97
+ "self": 7.008184298523702
98
+ },
99
+ "steps_from_proto": {
100
+ "total": 1.6750073989387602,
101
+ "count": 1044,
102
+ "is_parallel": true,
103
+ "self": 0.35391049971804023,
104
+ "children": {
105
+ "_process_rank_one_or_two_observation": {
106
+ "total": 1.32109689922072,
107
+ "count": 4176,
108
+ "is_parallel": true,
109
+ "self": 1.32109689922072
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ },
121
+ "trainer_advance": {
122
+ "total": 0.327406098600477,
123
+ "count": 522,
124
+ "self": 0.050374498474411666,
125
+ "children": {
126
+ "process_trajectory": {
127
+ "total": 0.2770316001260653,
128
+ "count": 522,
129
+ "self": 0.2770316001260653
130
+ }
131
+ }
132
+ }
133
+ }
134
+ },
135
+ "trainer_threads": {
136
+ "total": 2.500019036233425e-06,
137
+ "count": 1,
138
+ "self": 2.500019036233425e-06
139
+ },
140
+ "TrainerController._save_models": {
141
+ "total": 0.2548101000720635,
142
+ "count": 1,
143
+ "self": 0.014720900100655854,
144
+ "children": {
145
+ "RLTrainer._checkpoint": {
146
+ "total": 0.24008919997140765,
147
+ "count": 1,
148
+ "self": 0.24008919997140765
149
+ }
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ }
run_logs/training_status.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "SoccerTwos": {
3
+ "elo": 1199.9942601331636,
4
+ "checkpoints": [
5
+ {
6
+ "steps": 484,
7
+ "file_path": "results\\SoccerTwos\\SoccerTwos\\SoccerTwos-484.onnx",
8
+ "reward": 0.0,
9
+ "creation_time": 1709290907.717094,
10
+ "auxillary_file_paths": [
11
+ "results\\SoccerTwos\\SoccerTwos\\SoccerTwos-484.pt"
12
+ ]
13
+ }
14
+ ],
15
+ "final_checkpoint": {
16
+ "steps": 484,
17
+ "file_path": "results\\SoccerTwos\\SoccerTwos.onnx",
18
+ "reward": 0.0,
19
+ "creation_time": 1709290907.717094,
20
+ "auxillary_file_paths": [
21
+ "results\\SoccerTwos\\SoccerTwos\\SoccerTwos-484.pt"
22
+ ]
23
+ }
24
+ },
25
+ "metadata": {
26
+ "stats_format_version": "0.3.0",
27
+ "mlagents_version": "1.1.0.dev0",
28
+ "torch_version": "2.2.1+cpu"
29
+ }
30
+ }