-
Start AI Unity Simulator project in Unity and open the scene
AISimulation
. -
Start mlagents-learn with the following commands in your project's root folder. The
<some-id>
is a string tag you give to identify this training run.source venv/bin/activate # Activate virtual environment mlagents-learn config/trainer_config.yaml --run-id=<some-id>
-
After running the commands go to the Unity window and press the
Play
button in Unity to start the training process. -
After the training is finished, the new trained brain is created to the
results
-folder's subfolder which is called the same as the<some-id>
-tag you used in the--run-id
-argument in the training command. The training process will run long, therefore, you might need to stop it by clicking the pause button in the Unity app. -
Now, we have a trained model ready. The trained Brain file is called
PushBlock.nn
. in the/results/<some-id>
-folder
The config/trainer_config.yaml file has two sections:
- behaviors
- environment_parameters
behaviors
-section has the parameters to configure the neural network model. The environment_parameters
-section is explained here
The training uses curriculum learning and the config file's environment_parameters
-section has the parameters which change the simulation as the agent gets better. The environment_parameters
-section is explained here
For more information about the training process and parameters please follow the documentation of Unity at the following link.