first commit
Browse files- README.md +35 -0
- config.json +1 -0
- configuration.yaml +79 -0
- run_logs/timers.json +47 -0
- run_logs/training_status.json +7 -0
README.md
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: ml-agents
|
3 |
+
tags:
|
4 |
+
- Worm
|
5 |
+
- deep-reinforcement-learning
|
6 |
+
- reinforcement-learning
|
7 |
+
- ML-Agents-Worm
|
8 |
+
---
|
9 |
+
|
10 |
+
# **ppo** Agent playing **Worm**
|
11 |
+
This is a trained model of a **ppo** agent playing **Worm**
|
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: jarski/Worm-Unity-ML
|
33 |
+
3. Step 2: Select your *.nn /*.onnx file
|
34 |
+
4. Click on Watch the agent play 👀
|
35 |
+
|
config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default_settings": null, "behaviors": {"Worm": {"trainer_type": "ppo", "hyperparameters": {"batch_size": 2024, "buffer_size": 20240, "learning_rate": 0.0003, "beta": 0.005, "epsilon": 0.2, "lambd": 0.95, "num_epoch": 3, "shared_critic": false, "learning_rate_schedule": "linear", "beta_schedule": "linear", "epsilon_schedule": "linear"}, "checkpoint_interval": 500000, "network_settings": {"normalize": true, "hidden_units": 512, "num_layers": 3, "vis_encode_type": "simple", "memory": null, "goal_conditioning_type": "hyper", "deterministic": false}, "reward_signals": {"extrinsic": {"gamma": 0.995, "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": 70000, "time_horizon": 1000, "summary_freq": 30000, "threaded": false, "self_play": null, "behavioral_cloning": null}}, "env_settings": {"env_path": "./training-envs-executables/linux/Worm/Worm", "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": "Worm Training", "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,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
default_settings: null
|
2 |
+
behaviors:
|
3 |
+
Worm:
|
4 |
+
trainer_type: ppo
|
5 |
+
hyperparameters:
|
6 |
+
batch_size: 2024
|
7 |
+
buffer_size: 20240
|
8 |
+
learning_rate: 0.0003
|
9 |
+
beta: 0.005
|
10 |
+
epsilon: 0.2
|
11 |
+
lambd: 0.95
|
12 |
+
num_epoch: 3
|
13 |
+
shared_critic: false
|
14 |
+
learning_rate_schedule: linear
|
15 |
+
beta_schedule: linear
|
16 |
+
epsilon_schedule: linear
|
17 |
+
checkpoint_interval: 500000
|
18 |
+
network_settings:
|
19 |
+
normalize: true
|
20 |
+
hidden_units: 512
|
21 |
+
num_layers: 3
|
22 |
+
vis_encode_type: simple
|
23 |
+
memory: null
|
24 |
+
goal_conditioning_type: hyper
|
25 |
+
deterministic: false
|
26 |
+
reward_signals:
|
27 |
+
extrinsic:
|
28 |
+
gamma: 0.995
|
29 |
+
strength: 1.0
|
30 |
+
network_settings:
|
31 |
+
normalize: false
|
32 |
+
hidden_units: 128
|
33 |
+
num_layers: 2
|
34 |
+
vis_encode_type: simple
|
35 |
+
memory: null
|
36 |
+
goal_conditioning_type: hyper
|
37 |
+
deterministic: false
|
38 |
+
init_path: null
|
39 |
+
keep_checkpoints: 5
|
40 |
+
even_checkpoints: false
|
41 |
+
max_steps: 70000
|
42 |
+
time_horizon: 1000
|
43 |
+
summary_freq: 30000
|
44 |
+
threaded: false
|
45 |
+
self_play: null
|
46 |
+
behavioral_cloning: null
|
47 |
+
env_settings:
|
48 |
+
env_path: ./training-envs-executables/linux/Worm/Worm
|
49 |
+
env_args: null
|
50 |
+
base_port: 5005
|
51 |
+
num_envs: 1
|
52 |
+
num_areas: 1
|
53 |
+
timeout_wait: 60
|
54 |
+
seed: -1
|
55 |
+
max_lifetime_restarts: 10
|
56 |
+
restarts_rate_limit_n: 1
|
57 |
+
restarts_rate_limit_period_s: 60
|
58 |
+
engine_settings:
|
59 |
+
width: 84
|
60 |
+
height: 84
|
61 |
+
quality_level: 5
|
62 |
+
time_scale: 20
|
63 |
+
target_frame_rate: -1
|
64 |
+
capture_frame_rate: 60
|
65 |
+
no_graphics: true
|
66 |
+
no_graphics_monitor: false
|
67 |
+
environment_parameters: null
|
68 |
+
checkpoint_settings:
|
69 |
+
run_id: Worm Training
|
70 |
+
initialize_from: null
|
71 |
+
load_model: false
|
72 |
+
resume: false
|
73 |
+
force: false
|
74 |
+
train_model: false
|
75 |
+
inference: false
|
76 |
+
results_dir: results
|
77 |
+
torch_settings:
|
78 |
+
device: null
|
79 |
+
debug: false
|
run_logs/timers.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "root",
|
3 |
+
"metadata": {
|
4 |
+
"timer_format_version": "0.1.0",
|
5 |
+
"start_time_seconds": "1722628576",
|
6 |
+
"python_version": "3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]",
|
7 |
+
"command_line_arguments": "/usr/local/bin/mlagents-learn ./config/ppo/Worm.yaml --env=./training-envs-executables/linux/Worm/Worm --run-id=Worm Training --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.3.1+cu121",
|
12 |
+
"numpy_version": "1.23.5",
|
13 |
+
"end_time_seconds": "1722628576"
|
14 |
+
},
|
15 |
+
"total": 0.1625702880000972,
|
16 |
+
"count": 1,
|
17 |
+
"self": 0.03099327600102697,
|
18 |
+
"children": {
|
19 |
+
"run_training.setup": {
|
20 |
+
"total": 0.11411997799950768,
|
21 |
+
"count": 1,
|
22 |
+
"self": 0.11411997799950768
|
23 |
+
},
|
24 |
+
"TrainerController.start_learning": {
|
25 |
+
"total": 0.017457033999562555,
|
26 |
+
"count": 1,
|
27 |
+
"self": 0.0005945899993093917,
|
28 |
+
"children": {
|
29 |
+
"TrainerController._reset_env": {
|
30 |
+
"total": 0.016830808999657165,
|
31 |
+
"count": 1,
|
32 |
+
"self": 0.016830808999657165
|
33 |
+
},
|
34 |
+
"trainer_threads": {
|
35 |
+
"total": 1.7120000848080963e-06,
|
36 |
+
"count": 1,
|
37 |
+
"self": 1.7120000848080963e-06
|
38 |
+
},
|
39 |
+
"TrainerController._save_models": {
|
40 |
+
"total": 2.9923000511189457e-05,
|
41 |
+
"count": 1,
|
42 |
+
"self": 2.9923000511189457e-05
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
run_logs/training_status.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"metadata": {
|
3 |
+
"stats_format_version": "0.3.0",
|
4 |
+
"mlagents_version": "1.1.0.dev0",
|
5 |
+
"torch_version": "2.3.1+cu121"
|
6 |
+
}
|
7 |
+
}
|