A small project exploring the basic premise of reinforcement learning using Unity's ML agents. The project trains a game object to jump over obstacles at the correct time to score a point.
Create a Virtual Environment and install mlagents. Python is a prerequisite.
- cd into an empty folder where you want to create the virtual environment
py -m venv ExampleNameEnv
- To activate Virtual Environment, cd into virtual environment location and
.\Scripts\Activate
- While the virtual environment is activated,
pip install mlagents
- cd into yaml location inside the unity project
mlagents-learn Jumper.yaml --run-id="JumperTestx"
- Training a build.exe
mlagents-learn Jumper.yaml --run-id=JumperTestx --env= ./Build/Unity-ML-Agents.app --time-scale=10 --quality-level=0 --width=512 --height=512
- cd into location where "results" are stored
tensorboard --logdir=results