Skip to content

hovanroi/Car-AI-Unity-ML-Agents

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Car AI - Unity ML

A simple guide to training your own AI car, using Unity ML Agents and built-in Wheel Collider

Demo

Demo

Training

Demo

General

Install Unity 2023.2 or higher & Python 3.10.12

https://github.com/Unity-Technologies/ml-agents/blob/develop/docs/Installation.md

Create Virtual Environment

https://github.com/Unity-Technologies/ml-agents/blob/develop/docs/Using-Virtual-Environment.md

Training AI on Mac OS

Activate Virtual Environment

source [PATH TO VIRTUAL ENV]/bin/activate

Install mlagents (if not installed)

pip3 install mlagents

Resume training

cd [PATH TO UNITY PROJECT]
mlagents-learn config/car_config.yaml --run-id=Car --resume

Force training from beginning

cd [PATH TO UNITY PROJECT]
mlagents-learn config/car_config.yaml --run-id=Car --force

Training AI on Windows

Activate Virtual Environment

[PATH TO VIRTUAL ENV]\Scripts\activate

Install mlagents (if not installed)

pip3 install mlagents

Resume training

cd [PATH TO UNITY PROJECT]
mlagents-learn config/car_config.yaml --run-id=Car --resume --torch-device=cuda 

Force training from beginning

cd [PATH TO UNITY PROJECT]
mlagents-learn config/car_config.yaml --run-id=Car --force --torch-device=cuda

Using new AI Training Model

Copy file from [PATH TO UNITY PROJECT]/results/Car/Car.onnx to [PATH TO UNITY PROJECT]/Assets/Models/Car.onnx

About

A simple guide to training your own AI car, using Unity ML Agents and built-in Wheel Collider

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%