This is our final year project for the year 2020/2021
Download and Install Unity 2019.4.12f1 Open the package in Unity
Download and install Python 3.6.1 or higher
Use the package manager pip
(Recommended) Create a Virtual Environment Install PyTorch using:
pip3 install torch~=1.7.1 -f https://download.pytorch.org/whl/torch_stable.htmlInstall the mlagent package using:
python -m pip install mlagents==0.26.0The Final Game folder contains the Fighter.exe file. This runs the game with the most advanced brain we were able to create.
To test the multiple brains we created:
- Open the Fighter folder in Unity.
- In the Unity Hierarchy open Fight Scene > Environment > Enemy
- In the inspector scroll down to "Behaviour Parameters"
- From the project directory within Unity open Assets > Brains
- Drag any of the brains (the .onnx) files into the "model" section in the inspector
- Click play to play against that AI
To run training:
- Activate your Virtual Environment
- Run the game using the Unity Game Engine
- Go to the Fighter base directory and use the command
mlagents-learn config/FighterAI.yaml --run-id Test- Training has begun and you can use Cntrl + C to stop the training
If any other errors please refer to the UnityMLAgents documents. For installation issues check the installation document