1
1
# About ML-Agents package (` com.unity.ml-agents ` )
2
2
3
- The Unity ML-Agents package contains the C# SDK for the [ Unity ML-Agents Toolkit] .
4
-
5
- The package allows you to convert any Unity scene to into a learning
6
- environment and train character behaviors using a variety of machine learning
7
- algorithms. Additionally, it allows you to embed these trained behaviors back into
8
- Unity scenes to control your characters. More specifically, the package provides
9
- the following core functionalities:
10
-
11
- * Define Agents: entities, or characters, whose behavior will be learned. Agents are entities
12
- that generate observations (through sensors), take actions, and receive rewards from
13
- the environment.
14
- * Define Behaviors: entities that specifiy how an agent should act. Multiple agents can
15
- share the same Behavior and a scene may have multiple Behaviors.
16
- * Record demonstrations of an agent within the Editor. You can use demonstrations
17
- to help train a behavior for that agent.
18
- * Embedding a trained behavior into the scene via the [ Unity Inference Engine] .
19
- Embedded behaviors allow you to switch an Agent between learning and inference.
20
-
21
- Note that the * ML-Agents* package does not contain the machine learning algorithms for training
22
- behaviors. The * ML-Agents* package only supports instrumenting a Unity scene, setting it up for
23
- training, and then embedding the trained model back into your Unity scene. The machine learning
24
- algorithms that orchestrate training are part of the companion [ Python package] .
25
-
3
+ The Unity ML-Agents package contains the C# SDK for the [ Unity ML-Agents
4
+ Toolkit] .
5
+
6
+ The package allows you to convert any Unity scene to into a learning environment
7
+ and train character behaviors using a variety of machine learning algorithms.
8
+ Additionally, it allows you to embed these trained behaviors back into Unity
9
+ scenes to control your characters. More specifically, the package provides the
10
+ following core functionalities:
11
+
12
+ - Define Agents: entities, or characters, whose behavior will be learned. Agents
13
+ are entities that generate observations (through sensors), take actions, and
14
+ receive rewards from the environment.
15
+ - Define Behaviors: entities that specifiy how an agent should act. Multiple
16
+ agents can share the same Behavior and a scene may have multiple Behaviors.
17
+ - Record demonstrations of an agent within the Editor. You can use
18
+ demonstrations to help train a behavior for that agent.
19
+ - Embedding a trained behavior into the scene via the [ Unity Inference Engine] .
20
+ Embedded behaviors allow you to switch an Agent between learning and
21
+ inference.
22
+
23
+ Note that the _ ML-Agents_ package does not contain the machine learning
24
+ algorithms for training behaviors. The _ ML-Agents_ package only supports
25
+ instrumenting a Unity scene, setting it up for training, and then embedding the
26
+ trained model back into your Unity scene. The machine learning algorithms that
27
+ orchestrate training are part of the companion [ Python package] .
26
28
27
29
## Package contents
28
30
29
31
The following table describes the package folder structure:
30
32
31
- | ** Location** | ** Description** |
32
- | ---| ---|
33
- | * Documentation~ * | Contains the documentation for the Unity package.|
34
- | * Editor* | Contains utilities for Editor windows and drawers.|
35
- | * Plugins* | Contains third-party DLLs.|
36
- | * Runtime* | Contains core C# APIs for integrating ML-Agents into your Unity scene. |
37
- | * Tests* | Contains the unit tests for the package.|
38
-
33
+ | ** Location** | ** Description** |
34
+ | ---------------- | ---------------------------------------------------------------------- |
35
+ | _ Documentation~ _ | Contains the documentation for the Unity package. |
36
+ | _ Editor_ | Contains utilities for Editor windows and drawers. |
37
+ | _ Plugins_ | Contains third-party DLLs. |
38
+ | _ Runtime_ | Contains core C# APIs for integrating ML-Agents into your Unity scene. |
39
+ | _ Tests_ | Contains the unit tests for the package. |
39
40
40
41
<a name =" Installation " ></a >
42
+
41
43
## Installation
42
44
43
- To install this * ML-Agents* package, follow the instructions in the [ Package Manager documentation] .
45
+ To install this _ ML-Agents_ package, follow the instructions in the [ Package
46
+ Manager documentation] .
44
47
45
48
To install the companion Python package to enable training behaviors, follow the
46
49
[ installation instructions] on our [ GitHub repository] .
47
50
48
-
49
51
## Requirements
50
52
51
- This version of the Unity ML-Agents package is compatible with the following versions of the
52
- Unity Editor:
53
+ This version of the Unity ML-Agents package is compatible with the following
54
+ versions of the Unity Editor:
53
55
54
- * 2018.4 and later
56
+ - 2018.4 and later
55
57
56
-
57
- ## Known limitations
58
+ ## Known Limitations
58
59
59
60
### Training
60
- Training is limited to the Unity Editor and Standalone builds on Windows, MacOS, and Linux with the
61
- Mono scripting backend. Currently, training does not work with the IL2CPP scripting backend. Your
62
- environment will default to inference mode if training is not supported or is not currently running.
61
+
62
+ Training is limited to the Unity Editor and Standalone builds on Windows, MacOS,
63
+ and Linux with the Mono scripting backend. Currently, training does not work
64
+ with the IL2CPP scripting backend. Your environment will default to inference
65
+ mode if training is not supported or is not currently running.
63
66
64
67
### Inference
65
- Inference is executed via the [ Unity Inference Engine] ( https://docs.unity3d.com/Packages/com.unity.barracuda@latest/index.html ) .
68
+
69
+ Inference is executed via the
70
+ [ Unity Inference Engine] ( https://docs.unity3d.com/Packages/com.unity.barracuda@latest/index.html ) .
66
71
67
72
** CPU**
68
- - All platforms supported.
73
+
74
+ All platforms supported.
69
75
70
76
** GPU**
71
- - All platforms supported except:
72
- - WebGL and GLES 3/2 on Android / iPhone
73
77
74
- ** NOTE:** Mobile platform support includes:
75
- - Vulkan for Android
76
- - Metal for iOS.
78
+ All platforms supported except:
79
+
80
+ - WebGL and GLES 3/2 on Android / iPhone
81
+
82
+ ** NOTE:** Mobile platform support includes:
83
+
84
+ - Vulkan for Android
85
+ - Metal for iOS.
77
86
78
87
### Headless Mode
79
88
@@ -92,24 +101,27 @@ You can control the frequency of Academy stepping by calling
92
101
` Academy.Instance.EnvironmentStep() `
93
102
94
103
### Unity Inference Engine Models
104
+
95
105
Currently, only models created with our trainers are supported for running
96
106
ML-Agents with a neural network behavior.
97
107
98
-
99
108
## Helpful links
100
109
101
110
If you are new to the Unity ML-Agents package, or have a question after reading
102
- the documentation, you can checkout our
103
- [ GitHUb Repository] , which also includes a number of ways to [ connect with us]
104
- including our [ ML-Agents Forum] .
105
-
106
-
107
- [ Unity ML-Agents Toolkit ] : https://github.com/Unity-Technologies/ml-agents
108
- [ Unity Inference Engine ] : https://docs.unity3d.com/Packages/com.unity.barracuda@latest/index.html
109
- [ Package Manager documentation ] : https://docs.unity3d.com/Manual/upm-ui-install.html
110
- [ installation instructions ] : https://github.com/Unity-Technologies/ml-agents/blob/release_1_docs/docs/Installation.md
111
- [ GitHUb Repository ] : https://github.com/Unity-Technologies/ml-agents
112
- [ Python package ] : https://github.com/Unity-Technologies/ml-agents
113
- [ Execution Order of Event Functions ] : https://docs.unity3d.com/Manual/ExecutionOrder.html
114
- [ connect with us ] : https://github.com/Unity-Technologies/ml-agents#community-and-feedback
115
- [ ML-Agents Forum ] : https://forum.unity.com/forums/ml-agents.453/
111
+ the documentation, you can checkout our [ GitHUb Repository] , which also includes
112
+ a number of ways to [ connect with us] including our [ ML-Agents Forum] .
113
+
114
+ [ unity ML-Agents Toolkit ] : https://github.com/Unity-Technologies/ml-agents
115
+ [ unity inference engine] :
116
+ https://docs.unity3d.com/Packages/com.unity.barracuda@latest/index.html
117
+ [ package manager documentation] :
118
+ https://docs.unity3d.com/Manual/upm-ui-install.html
119
+ [ installation instructions] :
120
+ https://github.com/Unity-Technologies/ml-agents/blob/release_1_docs/docs/Installation.md
121
+ [ github repository ] : https://github.com/Unity-Technologies/ml-agents
122
+ [ python package ] : https://github.com/Unity-Technologies/ml-agents
123
+ [ execution order of event functions] :
124
+ https://docs.unity3d.com/Manual/ExecutionOrder.html
125
+ [ connect with us] :
126
+ https://github.com/Unity-Technologies/ml-agents#community-and-feedback
127
+ [ ml-agents forum ] : https://forum.unity.com/forums/ml-agents.453/
0 commit comments