Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
quick:agents [2020/02/18 10:04] – [ML-Agents Integration Guide] jesusmayoral | quick:agents [2020/02/18 10:29] – [Setting-up the environment] jesusmayoral | ||
---|---|---|---|
Line 9: | Line 9: | ||
To start creating a new tree with a behavior trained in ML-Agents in a project that is using Behavior Bricks, it is necessary to make the regular installantion of ML-Agents. More information can be retrieved in [the ML-Agents documentation.](https:// | To start creating a new tree with a behavior trained in ML-Agents in a project that is using Behavior Bricks, it is necessary to make the regular installantion of ML-Agents. More information can be retrieved in [the ML-Agents documentation.](https:// | ||
- | First thing we are going to do is to prepare | + | First thing we are going to do is to prepare |
- | + | ||
- | <code csharp> | + | |
- | using MLAgents; | + | |
- | + | ||
- | public class BBAcademy : Academy {} | + | |
- | </ | + | |
- | + | ||
- | Now we create a `learning brain` (e.g. by right clicking in a folder of the project tab and `create/ | + | |
- | + | ||
- | {{: | + | |
Before creating the C# script for our agent, we have to modify the player and the enemy: | Before creating the C# script for our agent, we have to modify the player and the enemy: | ||
Line 226: | Line 216: | ||
} | } | ||
- | public override void AgentAction(float[] vectorAction, string textAction) | + | public override void AgentAction(float[] vectorAction) |
{ | { | ||
// Actions, size = 2 | // Actions, size = 2 |