GitHub 535efc4e | 7 年前 | |
---|---|---|
.. | ||
Assets | 7 年前 | |
ProjectSettings | 7 年前 | |
README.md | 7 年前 |
README.md
Unity ML - Agents (Editor SDK)
Unity Setup
Make sure you have Unity 2017.1 or later installed. Download link available here.
Building a Unity Environment
- (1) Open the project in the Unity editor (If this is not first time running Unity, you'll be able to skip most of these immediate steps, choose directly from the list of recently opened projects and jump directly to )
- On the initial dialog, choose
Open
on the top options - On the file dialog, choose
ProjectName
and clickOpen
(It is safe to ignore any warning message about non-matching editor installation") - Once the project is open, on the
Project
panel (bottom of the tool), click the top folder forAssets
- Double-click the scene icon (Unity logo) to load all game assets
- On the initial dialog, choose
- (2) File -> Build Settings
- (3) Choose your target platform:
- (opt) Select “Developer Build” to log debug messages.
- (4) Set architecture:
X86_64
- (5) Click Build:
- Save environment binary to a sub-directory containing the model to use for training (you may need to click on the down arrow on the file chooser to be able to select that folder)
Example Projects
The Examples
subfolder contains a set of example environments to use either as starting points or templates for designing your own environments.
- 3DBalanceBall - Physics-based game where the agent must rotate a 3D-platform to keep a ball in the air. Supports both discrete and continuous control.
- GridWorld - A simple gridworld containing regions which provide positive and negative reward. The agent must learn to move to the rewarding regions (green) and avoid the negatively rewarding ones (red). Supports discrete control.
- Tennis - An adversarial game where two agents control rackets, which must be used to bounce a ball back and forth between them. Supports continuous control.
For more informoation on each of these environments, see this wiki page.
Within ML-Agents/Template
there also exists:
- Template - An empty Unity scene with a single Academy, Brain, and Agent. Designed to be used as a template for new environments.
Agents SDK Package
A link to Unity package containing the Agents SDK for Unity 2017.1 can be downloaded here :
For information on the use of each script, see the comments and documentation within the files themselves, or read the documentation.
Creating your own Unity Environment
For information on how to create a new Unity Environment, see the walkthrough here. If you have questions or run into issues, please feel free to create issues through the repo, and we will do our best to address them.
Embedding Models with TensorflowSharp [Experimental]
If you will be using Tensorflow Sharp in Unity, you must:
- Make sure you are using Unity 2017.1 or newer.
- Make sure the TensorflowSharp plugin is in your Asset folder. A Plugins folder which includes TF# can be downloaded here.
- Go to
Edit
->Project Settings
->Player
- For each of the platforms you target (
PC, Mac and Linux Standalone
,iOS
orAndroid
):- Go into
Other Settings
. - Select
Scripting Runtime Version
toExperimental (.NET 4.6 Equivalent)
- In
Scripting Defined Symbols
, add the flagENABLE_TENSORFLOW
- Go into
- Restart the Unity Editor.