MENU

Fun & Interesting

How to install Unity ML Agents Release 20 in 2023

Philipp Dominic Siedler 18,782 2 years ago
Video Not Working? Fix It Now

#unity #mlagents #ArtificialIntelligence #MachineLearning #ReinforcementLearning #AI #NeuralNetworks #gamedev In this video, I will show you how to install ML-Agents Release 20 for Unity 2022.3 or later, step by step, to train your first Machine Learning project using Unity and Reinforcement Learning. Unity is a 3d game development engine providing high-precision physics simulation. The tutorial in this video shows a step-by-step description of how to install Unity's Artificial Intelligence (AI) framework. ML Agents allows you to develop a learning environment, including games, robots, wind farms (https://www.youtube.com/watch?v=sjjBpFkaTGw), wildfire management systems (https://www.youtube.com/watch?v=aiVRAK3g4qs&t=4s) and many more use cases with a high level of abstraction or close to reality. At the end of the video, we will train one of my personal "Hello, World!" examples, the Push Block example, where an agent learns to push a block into a specified area. The deep neural networks are used to train a whole school of agents using the state-of-the-art learning algorithm Proximal Policy Optimisation (PPO). Fortunately, Unity's ML-Agents framework provides us with a python communicator, utilising PyTorch for training. Before you begin, please follow this guide to install: 1. Anaconda and Visual Studio Code: https://www.youtube.com/watch?v=ljFwYKL6-1U 2. Unity and Visual Studio Code Setup: https://www.youtube.com/watch?v=WKDKjaEBhs8&t 00:00 - Intro 00:22 - ML Agents ML Agents: https://github.com/Unity-Technologies/ml-agents ML Agents - Getting-Started: https://github.com/Unity-Technologies/ml-agents/blob/develop/docs/Getting-Started.md ML Agents - Installation: https://github.com/Unity-Technologies/ml-agents/blob/develop/docs/Installation.md 03:20 - Install Git Git Download: https://git-scm.com/downloads 04:30 - Clone ML Agents git clone --branch release_20 https://github.com/Unity-Technologies/ml-agents.git 06:20 - Create Anaconda Env conda create -n mlagents20 python=3.9 conda activate mlagents20 07:10 - Install PyTorch pip3 install torch -f https://download.pytorch.org/whl/torch_stable.html 07:50 - Install Cuda 11.8 nvcc --version https://developer.nvidia.com/cuda-11-8-0-download-archive 09:45 - Install ML Agents pip3 install -e ./ml-agents-envs pip3 install -e ./ml-agents mlagents-learn --help 11:10 - Install Protobuf 3.20.3 pip install protobuf==3.20.3 12:20 - Open Unity Project 13:50 - Training PushBlock mlagents-learn config/ppo/PushBlock.yaml --run-id="testing_pushblock" 15:00 - Install onnx pip install onnx 15:15 - Re-run Training mlagents-learn config/ppo/PushBlock.yaml --run-id="testing_pushblock" --force 16:00 - Test Neural Network

Comment