Skip to content
raphael-jmsPublic

About

Autonomously driving AI, in Unity

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Autonomous Driving AI

Just-for-fun side project trying to teach a car driving using RL in Unity. The code uses a quite realistic car model that includes nonlinearities such as skidding etc. and is taken from Unity standard assets.

The learning environment:

16 cars in parallel on randomized trajectories. The episode ends when a wall is hit. Then, a new trajectory is generated and the process repeats.

training_env

Result:

Racing1.mp4

Driving with pathfinding

Training an agent to find a path itself is hard - implementing it with a pathfinding algorithm (here: A*) is much easier. Agent and setup are the same, but I retrained the agent in a less cluttered environment since it seemed to rely mostly on the wall information, and not so much on the waypoints. You can find the code in the pathfinding branch.

training_env_cluttered

Result:

Racing.2.mp4

Usage

This project requires Unity Editor version 2021.3.15f1. To see the learning environment, navigate to Assets/Scenes and open main (car).unity. If you are using the pathfinding branch, go to Scenes to load either the Learning scene or the Evaluation scene.

About

Autonomously driving AI, in Unity

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages