ThomasFfefefef
commited on
Commit
•
90bd0bd
1
Parent(s):
a46d927
Added the environment
Browse files- README.md +113 -0
- SnowballFight-1vs1.unitypackage +0 -0
- assets/img/snowballfight.gif +0 -0
- packages/manifest.json +45 -0
- packages/packages-lock.json +416 -0
- saved_model/SnowballFight1vs1-4999988.onnx +3 -0
- snowballfight1vs1.yaml +34 -0
README.md
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- deep-reinforcement-learning
|
5 |
+
- reinforcement-learning
|
6 |
+
- ml-agents
|
7 |
+
|
8 |
+
environment:
|
9 |
+
- SnowballFight-1vs1
|
10 |
+
|
11 |
+
model-index:
|
12 |
+
- name: ML-Agents-SnowballFight-1vs1
|
13 |
+
---
|
14 |
+
|
15 |
+
# Snowball Fight ☃️, a multi-agent environment for ML-Agents made by Hugging Face
|
16 |
+
|
17 |
+
A multi-agent environment using Unity ML-Agents Toolkit where two agents compete in a 1vs1 snowball fight game.
|
18 |
+
|
19 |
+
👉 You can [play it online at this link](https://huggingface.co/spaces/ThomasSimonini/SnowballFight).
|
20 |
+
|
21 |
+
⚠️ You need to have some skills in ML-Agents if you want to use it if it's not the case [check the documentation](https://github.com/Unity-Technologies/ml-agents/tree/main/docs)
|
22 |
+
|
23 |
+
<img src="assets/img/snowballfight.gif" alt="Snowball Fight 1vs1" align="middle" width="3000"/>
|
24 |
+
|
25 |
+
## The Environment
|
26 |
+
- Two agents compete **in a 1 vs 1 snowball fight game**.
|
27 |
+
- The goal is to **hit the opponent team while avoiding the opponent's snowballs ❄️**.
|
28 |
+
|
29 |
+
### Observation Space
|
30 |
+
- Ray-casts:
|
31 |
+
- **10 ray-casts forward** distributed over 100 degrees: detecting opponent.
|
32 |
+
- **10 ray-casts forward** distributed over 100 degrees: detecting walls, shelter and frontier.
|
33 |
+
- **10 ray-casts forward** distributed over 100 degrees: detecting snowballs.
|
34 |
+
- **3 ray-casts backward** distributed over 45 degrees: detecting wall and shelter.
|
35 |
+
|
36 |
+
- Vector Observations:
|
37 |
+
- **Bool canShoot** (you can only shoot a snowball every 2 seconds).
|
38 |
+
- **Float currentHealth**: normalized [0, 1]
|
39 |
+
- **Vector3 vertical speed**
|
40 |
+
- **Vector3 horizontal speed**
|
41 |
+
- **Vector3 "home" position**
|
42 |
+
|
43 |
+
### Action Space (Discrete)
|
44 |
+
- Vector Action space:
|
45 |
+
- **Four branched actions** corresponding to forward, backward, sideways movement, rotation, and snowball shoot.
|
46 |
+
|
47 |
+
### Agent Reward Function (dependant):
|
48 |
+
- If the team is **injured**:
|
49 |
+
- 0.1 to the shooter.
|
50 |
+
- If the team is **dead**:
|
51 |
+
- (1 - accumulated time penalty): when a snowball hits the
|
52 |
+
opponent, the accumulated time penalty decreases by (1 / MaxStep) every fixed update and is reset to 0 at the beginning of an episode.
|
53 |
+
- (-1) When a snowball hit our team.
|
54 |
+
|
55 |
+
### Addendum
|
56 |
+
- There **is no friendly fire**, which means that an agent can't shoot himself, or in the future, in a 2vs2 game can't shoot a teammate.
|
57 |
+
|
58 |
+
|
59 |
+
## How to use it
|
60 |
+
### Set-up the environment
|
61 |
+
1. Clone this project `git clone https://huggingface.co/ThomasSimonini/ML-Agents-SnowballFight-1vs1`
|
62 |
+
2. Open Unity Hub and create a new 3D Project
|
63 |
+
3. In the cloned project folder, open `.\ML-Agents-SnowballFight-1vs1\packages` and copy manifest.json and package.lock.json
|
64 |
+
4. Paste these two files in `Your Unity Project\Packages` => this will install the required packages.
|
65 |
+
5. Drop the SnowballFight-1vs1 unity package to your Unity Project.
|
66 |
+
|
67 |
+
### Watch the trained agents
|
68 |
+
6. If you want to watch the trained agents, open `Assets\1vs1\Scenes\1vs1_v2_Training.` place the `\ML-Agents-SnowballFight-1vs1\saved_model\SnowballFight1vs1-4999988.onnx` into BlueAgent and PurpleAgent Model.
|
69 |
+
|
70 |
+
### Train, the agent
|
71 |
+
6. If you want to train it again, the scene is `Assets\1vs1\Scenes\1vs1_v2_Training.`
|
72 |
+
|
73 |
+
|
74 |
+
## Training info
|
75 |
+
- SnowballFight1vs1 was trained with 5100000 steps.
|
76 |
+
- The final ELO score was 1766.452.
|
77 |
+
|
78 |
+
### Config File
|
79 |
+
`behaviors:
|
80 |
+
SnowballFight1vs1:
|
81 |
+
trainer_type: ppo
|
82 |
+
hyperparameters:
|
83 |
+
batch_size: 2048
|
84 |
+
buffer_size: 20480
|
85 |
+
learning_rate: 0.0003
|
86 |
+
beta: 0.005
|
87 |
+
epsilon: 0.2
|
88 |
+
lambd: 0.95
|
89 |
+
num_epoch: 3
|
90 |
+
learning_rate_schedule: constant
|
91 |
+
network_settings:
|
92 |
+
normalize: false
|
93 |
+
hidden_units: 512
|
94 |
+
num_layers: 2
|
95 |
+
vis_encode_type: simple
|
96 |
+
reward_signals:
|
97 |
+
extrinsic:
|
98 |
+
gamma: 0.99
|
99 |
+
strength: 1.0
|
100 |
+
keep_checkpoints: 40
|
101 |
+
checkpoint_interval: 200000
|
102 |
+
max_steps: 50000000
|
103 |
+
time_horizon: 1000
|
104 |
+
summary_freq: 50000
|
105 |
+
self_play:
|
106 |
+
save_steps: 50000
|
107 |
+
team_change: 200000
|
108 |
+
swap_steps: 2000
|
109 |
+
window: 10
|
110 |
+
play_against_latest_model_ratio: 0.5
|
111 |
+
initial_elo: 1200.0
|
112 |
+
`
|
113 |
+
|
SnowballFight-1vs1.unitypackage
ADDED
Binary file (575 kB). View file
|
|
assets/img/snowballfight.gif
ADDED
packages/manifest.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"dependencies": {
|
3 |
+
"com.unity.collab-proxy": "1.9.0",
|
4 |
+
"com.unity.ide.rider": "2.0.7",
|
5 |
+
"com.unity.ide.visualstudio": "2.0.11",
|
6 |
+
"com.unity.ide.vscode": "1.2.3",
|
7 |
+
"com.unity.ml-agents": "2.1.0-exp.1",
|
8 |
+
"com.unity.progrids": "3.0.3-preview.6",
|
9 |
+
"com.unity.test-framework": "1.1.29",
|
10 |
+
"com.unity.textmeshpro": "3.0.6",
|
11 |
+
"com.unity.timeline": "1.4.8",
|
12 |
+
"com.unity.ui": "1.0.0-preview.18",
|
13 |
+
"com.unity.ui.builder": "1.0.0-preview.18",
|
14 |
+
"com.unity.modules.ai": "1.0.0",
|
15 |
+
"com.unity.modules.androidjni": "1.0.0",
|
16 |
+
"com.unity.modules.animation": "1.0.0",
|
17 |
+
"com.unity.modules.assetbundle": "1.0.0",
|
18 |
+
"com.unity.modules.audio": "1.0.0",
|
19 |
+
"com.unity.modules.cloth": "1.0.0",
|
20 |
+
"com.unity.modules.director": "1.0.0",
|
21 |
+
"com.unity.modules.imageconversion": "1.0.0",
|
22 |
+
"com.unity.modules.imgui": "1.0.0",
|
23 |
+
"com.unity.modules.jsonserialize": "1.0.0",
|
24 |
+
"com.unity.modules.particlesystem": "1.0.0",
|
25 |
+
"com.unity.modules.physics": "1.0.0",
|
26 |
+
"com.unity.modules.physics2d": "1.0.0",
|
27 |
+
"com.unity.modules.screencapture": "1.0.0",
|
28 |
+
"com.unity.modules.terrain": "1.0.0",
|
29 |
+
"com.unity.modules.terrainphysics": "1.0.0",
|
30 |
+
"com.unity.modules.tilemap": "1.0.0",
|
31 |
+
"com.unity.modules.uielements": "1.0.0",
|
32 |
+
"com.unity.modules.umbra": "1.0.0",
|
33 |
+
"com.unity.modules.unityanalytics": "1.0.0",
|
34 |
+
"com.unity.modules.unitywebrequest": "1.0.0",
|
35 |
+
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
|
36 |
+
"com.unity.modules.unitywebrequestaudio": "1.0.0",
|
37 |
+
"com.unity.modules.unitywebrequesttexture": "1.0.0",
|
38 |
+
"com.unity.modules.unitywebrequestwww": "1.0.0",
|
39 |
+
"com.unity.modules.vehicles": "1.0.0",
|
40 |
+
"com.unity.modules.video": "1.0.0",
|
41 |
+
"com.unity.modules.vr": "1.0.0",
|
42 |
+
"com.unity.modules.wind": "1.0.0",
|
43 |
+
"com.unity.modules.xr": "1.0.0"
|
44 |
+
}
|
45 |
+
}
|
packages/packages-lock.json
ADDED
@@ -0,0 +1,416 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"dependencies": {
|
3 |
+
"com.unity.barracuda": {
|
4 |
+
"version": "2.0.0-pre.3",
|
5 |
+
"depth": 1,
|
6 |
+
"source": "registry",
|
7 |
+
"dependencies": {
|
8 |
+
"com.unity.burst": "1.3.4",
|
9 |
+
"com.unity.modules.jsonserialize": "1.0.0",
|
10 |
+
"com.unity.modules.imageconversion": "1.0.0"
|
11 |
+
},
|
12 |
+
"url": "https://packages.unity.com"
|
13 |
+
},
|
14 |
+
"com.unity.burst": {
|
15 |
+
"version": "1.3.4",
|
16 |
+
"depth": 2,
|
17 |
+
"source": "registry",
|
18 |
+
"dependencies": {
|
19 |
+
"com.unity.mathematics": "1.2.1"
|
20 |
+
},
|
21 |
+
"url": "https://packages.unity.com"
|
22 |
+
},
|
23 |
+
"com.unity.collab-proxy": {
|
24 |
+
"version": "1.9.0",
|
25 |
+
"depth": 0,
|
26 |
+
"source": "registry",
|
27 |
+
"dependencies": {},
|
28 |
+
"url": "https://packages.unity.com"
|
29 |
+
},
|
30 |
+
"com.unity.ext.nunit": {
|
31 |
+
"version": "1.0.6",
|
32 |
+
"depth": 1,
|
33 |
+
"source": "registry",
|
34 |
+
"dependencies": {},
|
35 |
+
"url": "https://packages.unity.com"
|
36 |
+
},
|
37 |
+
"com.unity.ide.rider": {
|
38 |
+
"version": "2.0.7",
|
39 |
+
"depth": 0,
|
40 |
+
"source": "registry",
|
41 |
+
"dependencies": {
|
42 |
+
"com.unity.test-framework": "1.1.1"
|
43 |
+
},
|
44 |
+
"url": "https://packages.unity.com"
|
45 |
+
},
|
46 |
+
"com.unity.ide.visualstudio": {
|
47 |
+
"version": "2.0.11",
|
48 |
+
"depth": 0,
|
49 |
+
"source": "registry",
|
50 |
+
"dependencies": {
|
51 |
+
"com.unity.test-framework": "1.1.9"
|
52 |
+
},
|
53 |
+
"url": "https://packages.unity.com"
|
54 |
+
},
|
55 |
+
"com.unity.ide.vscode": {
|
56 |
+
"version": "1.2.3",
|
57 |
+
"depth": 0,
|
58 |
+
"source": "registry",
|
59 |
+
"dependencies": {},
|
60 |
+
"url": "https://packages.unity.com"
|
61 |
+
},
|
62 |
+
"com.unity.mathematics": {
|
63 |
+
"version": "1.2.1",
|
64 |
+
"depth": 3,
|
65 |
+
"source": "registry",
|
66 |
+
"dependencies": {},
|
67 |
+
"url": "https://packages.unity.com"
|
68 |
+
},
|
69 |
+
"com.unity.ml-agents": {
|
70 |
+
"version": "2.1.0-exp.1",
|
71 |
+
"depth": 0,
|
72 |
+
"source": "registry",
|
73 |
+
"dependencies": {
|
74 |
+
"com.unity.barracuda": "2.0.0-pre.3",
|
75 |
+
"com.unity.modules.imageconversion": "1.0.0",
|
76 |
+
"com.unity.modules.jsonserialize": "1.0.0"
|
77 |
+
},
|
78 |
+
"url": "https://packages.unity.com"
|
79 |
+
},
|
80 |
+
"com.unity.progrids": {
|
81 |
+
"version": "3.0.3-preview.6",
|
82 |
+
"depth": 0,
|
83 |
+
"source": "registry",
|
84 |
+
"dependencies": {
|
85 |
+
"com.unity.settings-manager": "1.0.2"
|
86 |
+
},
|
87 |
+
"url": "https://packages.unity.com"
|
88 |
+
},
|
89 |
+
"com.unity.settings-manager": {
|
90 |
+
"version": "1.0.2",
|
91 |
+
"depth": 1,
|
92 |
+
"source": "registry",
|
93 |
+
"dependencies": {},
|
94 |
+
"url": "https://packages.unity.com"
|
95 |
+
},
|
96 |
+
"com.unity.test-framework": {
|
97 |
+
"version": "1.1.29",
|
98 |
+
"depth": 0,
|
99 |
+
"source": "registry",
|
100 |
+
"dependencies": {
|
101 |
+
"com.unity.ext.nunit": "1.0.6",
|
102 |
+
"com.unity.modules.imgui": "1.0.0",
|
103 |
+
"com.unity.modules.jsonserialize": "1.0.0"
|
104 |
+
},
|
105 |
+
"url": "https://packages.unity.com"
|
106 |
+
},
|
107 |
+
"com.unity.textcore": {
|
108 |
+
"version": "1.0.0-preview.3",
|
109 |
+
"depth": 1,
|
110 |
+
"source": "registry",
|
111 |
+
"dependencies": {},
|
112 |
+
"url": "https://packages.unity.com"
|
113 |
+
},
|
114 |
+
"com.unity.textmeshpro": {
|
115 |
+
"version": "3.0.6",
|
116 |
+
"depth": 0,
|
117 |
+
"source": "registry",
|
118 |
+
"dependencies": {
|
119 |
+
"com.unity.ugui": "1.0.0"
|
120 |
+
},
|
121 |
+
"url": "https://packages.unity.com"
|
122 |
+
},
|
123 |
+
"com.unity.timeline": {
|
124 |
+
"version": "1.4.8",
|
125 |
+
"depth": 0,
|
126 |
+
"source": "registry",
|
127 |
+
"dependencies": {
|
128 |
+
"com.unity.modules.director": "1.0.0",
|
129 |
+
"com.unity.modules.animation": "1.0.0",
|
130 |
+
"com.unity.modules.audio": "1.0.0",
|
131 |
+
"com.unity.modules.particlesystem": "1.0.0"
|
132 |
+
},
|
133 |
+
"url": "https://packages.unity.com"
|
134 |
+
},
|
135 |
+
"com.unity.ugui": {
|
136 |
+
"version": "1.0.0",
|
137 |
+
"depth": 1,
|
138 |
+
"source": "builtin",
|
139 |
+
"dependencies": {
|
140 |
+
"com.unity.modules.ui": "1.0.0",
|
141 |
+
"com.unity.modules.imgui": "1.0.0"
|
142 |
+
}
|
143 |
+
},
|
144 |
+
"com.unity.ui": {
|
145 |
+
"version": "1.0.0-preview.18",
|
146 |
+
"depth": 0,
|
147 |
+
"source": "registry",
|
148 |
+
"dependencies": {
|
149 |
+
"com.unity.modules.uielementsnative": "1.0.0",
|
150 |
+
"com.unity.textcore": "1.0.0-preview.3"
|
151 |
+
},
|
152 |
+
"url": "https://packages.unity.com"
|
153 |
+
},
|
154 |
+
"com.unity.ui.builder": {
|
155 |
+
"version": "1.0.0-preview.18",
|
156 |
+
"depth": 0,
|
157 |
+
"source": "registry",
|
158 |
+
"dependencies": {},
|
159 |
+
"url": "https://packages.unity.com"
|
160 |
+
},
|
161 |
+
"com.unity.modules.ai": {
|
162 |
+
"version": "1.0.0",
|
163 |
+
"depth": 0,
|
164 |
+
"source": "builtin",
|
165 |
+
"dependencies": {}
|
166 |
+
},
|
167 |
+
"com.unity.modules.androidjni": {
|
168 |
+
"version": "1.0.0",
|
169 |
+
"depth": 0,
|
170 |
+
"source": "builtin",
|
171 |
+
"dependencies": {}
|
172 |
+
},
|
173 |
+
"com.unity.modules.animation": {
|
174 |
+
"version": "1.0.0",
|
175 |
+
"depth": 0,
|
176 |
+
"source": "builtin",
|
177 |
+
"dependencies": {}
|
178 |
+
},
|
179 |
+
"com.unity.modules.assetbundle": {
|
180 |
+
"version": "1.0.0",
|
181 |
+
"depth": 0,
|
182 |
+
"source": "builtin",
|
183 |
+
"dependencies": {}
|
184 |
+
},
|
185 |
+
"com.unity.modules.audio": {
|
186 |
+
"version": "1.0.0",
|
187 |
+
"depth": 0,
|
188 |
+
"source": "builtin",
|
189 |
+
"dependencies": {}
|
190 |
+
},
|
191 |
+
"com.unity.modules.cloth": {
|
192 |
+
"version": "1.0.0",
|
193 |
+
"depth": 0,
|
194 |
+
"source": "builtin",
|
195 |
+
"dependencies": {
|
196 |
+
"com.unity.modules.physics": "1.0.0"
|
197 |
+
}
|
198 |
+
},
|
199 |
+
"com.unity.modules.director": {
|
200 |
+
"version": "1.0.0",
|
201 |
+
"depth": 0,
|
202 |
+
"source": "builtin",
|
203 |
+
"dependencies": {
|
204 |
+
"com.unity.modules.audio": "1.0.0",
|
205 |
+
"com.unity.modules.animation": "1.0.0"
|
206 |
+
}
|
207 |
+
},
|
208 |
+
"com.unity.modules.imageconversion": {
|
209 |
+
"version": "1.0.0",
|
210 |
+
"depth": 0,
|
211 |
+
"source": "builtin",
|
212 |
+
"dependencies": {}
|
213 |
+
},
|
214 |
+
"com.unity.modules.imgui": {
|
215 |
+
"version": "1.0.0",
|
216 |
+
"depth": 0,
|
217 |
+
"source": "builtin",
|
218 |
+
"dependencies": {}
|
219 |
+
},
|
220 |
+
"com.unity.modules.jsonserialize": {
|
221 |
+
"version": "1.0.0",
|
222 |
+
"depth": 0,
|
223 |
+
"source": "builtin",
|
224 |
+
"dependencies": {}
|
225 |
+
},
|
226 |
+
"com.unity.modules.particlesystem": {
|
227 |
+
"version": "1.0.0",
|
228 |
+
"depth": 0,
|
229 |
+
"source": "builtin",
|
230 |
+
"dependencies": {}
|
231 |
+
},
|
232 |
+
"com.unity.modules.physics": {
|
233 |
+
"version": "1.0.0",
|
234 |
+
"depth": 0,
|
235 |
+
"source": "builtin",
|
236 |
+
"dependencies": {}
|
237 |
+
},
|
238 |
+
"com.unity.modules.physics2d": {
|
239 |
+
"version": "1.0.0",
|
240 |
+
"depth": 0,
|
241 |
+
"source": "builtin",
|
242 |
+
"dependencies": {}
|
243 |
+
},
|
244 |
+
"com.unity.modules.screencapture": {
|
245 |
+
"version": "1.0.0",
|
246 |
+
"depth": 0,
|
247 |
+
"source": "builtin",
|
248 |
+
"dependencies": {
|
249 |
+
"com.unity.modules.imageconversion": "1.0.0"
|
250 |
+
}
|
251 |
+
},
|
252 |
+
"com.unity.modules.subsystems": {
|
253 |
+
"version": "1.0.0",
|
254 |
+
"depth": 1,
|
255 |
+
"source": "builtin",
|
256 |
+
"dependencies": {
|
257 |
+
"com.unity.modules.jsonserialize": "1.0.0"
|
258 |
+
}
|
259 |
+
},
|
260 |
+
"com.unity.modules.terrain": {
|
261 |
+
"version": "1.0.0",
|
262 |
+
"depth": 0,
|
263 |
+
"source": "builtin",
|
264 |
+
"dependencies": {}
|
265 |
+
},
|
266 |
+
"com.unity.modules.terrainphysics": {
|
267 |
+
"version": "1.0.0",
|
268 |
+
"depth": 0,
|
269 |
+
"source": "builtin",
|
270 |
+
"dependencies": {
|
271 |
+
"com.unity.modules.physics": "1.0.0",
|
272 |
+
"com.unity.modules.terrain": "1.0.0"
|
273 |
+
}
|
274 |
+
},
|
275 |
+
"com.unity.modules.tilemap": {
|
276 |
+
"version": "1.0.0",
|
277 |
+
"depth": 0,
|
278 |
+
"source": "builtin",
|
279 |
+
"dependencies": {
|
280 |
+
"com.unity.modules.physics2d": "1.0.0"
|
281 |
+
}
|
282 |
+
},
|
283 |
+
"com.unity.modules.ui": {
|
284 |
+
"version": "1.0.0",
|
285 |
+
"depth": 1,
|
286 |
+
"source": "builtin",
|
287 |
+
"dependencies": {}
|
288 |
+
},
|
289 |
+
"com.unity.modules.uielements": {
|
290 |
+
"version": "1.0.0",
|
291 |
+
"depth": 0,
|
292 |
+
"source": "builtin",
|
293 |
+
"dependencies": {
|
294 |
+
"com.unity.modules.ui": "1.0.0",
|
295 |
+
"com.unity.modules.imgui": "1.0.0",
|
296 |
+
"com.unity.modules.jsonserialize": "1.0.0",
|
297 |
+
"com.unity.modules.uielementsnative": "1.0.0"
|
298 |
+
}
|
299 |
+
},
|
300 |
+
"com.unity.modules.uielementsnative": {
|
301 |
+
"version": "1.0.0",
|
302 |
+
"depth": 1,
|
303 |
+
"source": "builtin",
|
304 |
+
"dependencies": {
|
305 |
+
"com.unity.modules.ui": "1.0.0",
|
306 |
+
"com.unity.modules.imgui": "1.0.0",
|
307 |
+
"com.unity.modules.jsonserialize": "1.0.0"
|
308 |
+
}
|
309 |
+
},
|
310 |
+
"com.unity.modules.umbra": {
|
311 |
+
"version": "1.0.0",
|
312 |
+
"depth": 0,
|
313 |
+
"source": "builtin",
|
314 |
+
"dependencies": {}
|
315 |
+
},
|
316 |
+
"com.unity.modules.unityanalytics": {
|
317 |
+
"version": "1.0.0",
|
318 |
+
"depth": 0,
|
319 |
+
"source": "builtin",
|
320 |
+
"dependencies": {
|
321 |
+
"com.unity.modules.unitywebrequest": "1.0.0",
|
322 |
+
"com.unity.modules.jsonserialize": "1.0.0"
|
323 |
+
}
|
324 |
+
},
|
325 |
+
"com.unity.modules.unitywebrequest": {
|
326 |
+
"version": "1.0.0",
|
327 |
+
"depth": 0,
|
328 |
+
"source": "builtin",
|
329 |
+
"dependencies": {}
|
330 |
+
},
|
331 |
+
"com.unity.modules.unitywebrequestassetbundle": {
|
332 |
+
"version": "1.0.0",
|
333 |
+
"depth": 0,
|
334 |
+
"source": "builtin",
|
335 |
+
"dependencies": {
|
336 |
+
"com.unity.modules.assetbundle": "1.0.0",
|
337 |
+
"com.unity.modules.unitywebrequest": "1.0.0"
|
338 |
+
}
|
339 |
+
},
|
340 |
+
"com.unity.modules.unitywebrequestaudio": {
|
341 |
+
"version": "1.0.0",
|
342 |
+
"depth": 0,
|
343 |
+
"source": "builtin",
|
344 |
+
"dependencies": {
|
345 |
+
"com.unity.modules.unitywebrequest": "1.0.0",
|
346 |
+
"com.unity.modules.audio": "1.0.0"
|
347 |
+
}
|
348 |
+
},
|
349 |
+
"com.unity.modules.unitywebrequesttexture": {
|
350 |
+
"version": "1.0.0",
|
351 |
+
"depth": 0,
|
352 |
+
"source": "builtin",
|
353 |
+
"dependencies": {
|
354 |
+
"com.unity.modules.unitywebrequest": "1.0.0",
|
355 |
+
"com.unity.modules.imageconversion": "1.0.0"
|
356 |
+
}
|
357 |
+
},
|
358 |
+
"com.unity.modules.unitywebrequestwww": {
|
359 |
+
"version": "1.0.0",
|
360 |
+
"depth": 0,
|
361 |
+
"source": "builtin",
|
362 |
+
"dependencies": {
|
363 |
+
"com.unity.modules.unitywebrequest": "1.0.0",
|
364 |
+
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
|
365 |
+
"com.unity.modules.unitywebrequestaudio": "1.0.0",
|
366 |
+
"com.unity.modules.audio": "1.0.0",
|
367 |
+
"com.unity.modules.assetbundle": "1.0.0",
|
368 |
+
"com.unity.modules.imageconversion": "1.0.0"
|
369 |
+
}
|
370 |
+
},
|
371 |
+
"com.unity.modules.vehicles": {
|
372 |
+
"version": "1.0.0",
|
373 |
+
"depth": 0,
|
374 |
+
"source": "builtin",
|
375 |
+
"dependencies": {
|
376 |
+
"com.unity.modules.physics": "1.0.0"
|
377 |
+
}
|
378 |
+
},
|
379 |
+
"com.unity.modules.video": {
|
380 |
+
"version": "1.0.0",
|
381 |
+
"depth": 0,
|
382 |
+
"source": "builtin",
|
383 |
+
"dependencies": {
|
384 |
+
"com.unity.modules.audio": "1.0.0",
|
385 |
+
"com.unity.modules.ui": "1.0.0",
|
386 |
+
"com.unity.modules.unitywebrequest": "1.0.0"
|
387 |
+
}
|
388 |
+
},
|
389 |
+
"com.unity.modules.vr": {
|
390 |
+
"version": "1.0.0",
|
391 |
+
"depth": 0,
|
392 |
+
"source": "builtin",
|
393 |
+
"dependencies": {
|
394 |
+
"com.unity.modules.jsonserialize": "1.0.0",
|
395 |
+
"com.unity.modules.physics": "1.0.0",
|
396 |
+
"com.unity.modules.xr": "1.0.0"
|
397 |
+
}
|
398 |
+
},
|
399 |
+
"com.unity.modules.wind": {
|
400 |
+
"version": "1.0.0",
|
401 |
+
"depth": 0,
|
402 |
+
"source": "builtin",
|
403 |
+
"dependencies": {}
|
404 |
+
},
|
405 |
+
"com.unity.modules.xr": {
|
406 |
+
"version": "1.0.0",
|
407 |
+
"depth": 0,
|
408 |
+
"source": "builtin",
|
409 |
+
"dependencies": {
|
410 |
+
"com.unity.modules.physics": "1.0.0",
|
411 |
+
"com.unity.modules.jsonserialize": "1.0.0",
|
412 |
+
"com.unity.modules.subsystems": "1.0.0"
|
413 |
+
}
|
414 |
+
}
|
415 |
+
}
|
416 |
+
}
|
saved_model/SnowballFight1vs1-4999988.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bbaa7a57cd10e53100e9356cc0c7f3bd476be5a75bd2ce3a10cd3d2c3f3c881c
|
3 |
+
size 2587356
|
snowballfight1vs1.yaml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
behaviors:
|
2 |
+
SnowballFight1vs1:
|
3 |
+
trainer_type: ppo
|
4 |
+
hyperparameters:
|
5 |
+
batch_size: 2048
|
6 |
+
buffer_size: 20480
|
7 |
+
learning_rate: 0.0003
|
8 |
+
beta: 0.005
|
9 |
+
epsilon: 0.2
|
10 |
+
lambd: 0.95
|
11 |
+
num_epoch: 3
|
12 |
+
learning_rate_schedule: constant
|
13 |
+
network_settings:
|
14 |
+
normalize: false
|
15 |
+
hidden_units: 512
|
16 |
+
num_layers: 2
|
17 |
+
vis_encode_type: simple
|
18 |
+
reward_signals:
|
19 |
+
extrinsic:
|
20 |
+
gamma: 0.99
|
21 |
+
strength: 1.0
|
22 |
+
keep_checkpoints: 40
|
23 |
+
checkpoint_interval: 200000
|
24 |
+
max_steps: 50000000
|
25 |
+
time_horizon: 1000
|
26 |
+
summary_freq: 50000
|
27 |
+
self_play:
|
28 |
+
save_steps: 50000
|
29 |
+
team_change: 200000
|
30 |
+
swap_steps: 2000
|
31 |
+
window: 10
|
32 |
+
play_against_latest_model_ratio: 0.5
|
33 |
+
initial_elo: 1200.0
|
34 |
+
|