An AI learns to park a car in a parking lot in a 3D physics simulation. The simulation was implemented using Unity’s ML-Agents framework (https://unity3d.com/machine-learning). The AI consists of a deep Neural Network with 3 hidden layers of 128 neurons each. It is trained with the Proximal Policy Optimization (PPO) algorithm, which is a Reinforcement Learning approach.
Basically, the input of the Neural Network are the readings of eight depth sensors, the car’s current speed and position, as well as its relative position to the target. The outputs of the Neural Network are interpreted as engine force, braking force and turning force. These outputs can be seen at the top right corner of the zoomed out camera shots.
The AI starts off with random behaviour, i.e. the Neural Network is initialized with random weights. It then gradually learns to solve the task by reacting to environment feedback accordingly. The environment tells the AI whether it is doing good or bad with positive or negative reward signals.
In this project, the AI is rewarded with small positive signals for getting closer to the parking spot, which is outlined in red, and gets a larger reward when it actually reaches the parking spot and stops there. The final reward for reaching the parking spot is dependent on how parallel the car stops in relation to the actual parking position. If the car stops in a 90° angle to the actual parking direction for instance, the AI will only be rewarded a very small amount, relative to the amount it would get for stopping completely parallel to the actual direction.
The AI is penalized with a negative reward signal, when it either drives further away from the parking spot or if it crashes into any obstacles.
The training process shown in this video took about 23 hours on a computer with an i5 (7th or 8th gen) and a GTX 1070 with 100x simulation speed.
Subscribe for more content like this:
Follow me on Twitter for more frequent updates on my projects:
Also check out my other videos related to this Project:
Two AI fight for the same Parking Spot:
Neural Networks Explained in a Minute:
Cars learn to maneuver Parcour with Genetic Algorithm:
Music from Bensound.com:
Timelapse Music: “The Elevator Bossa Nova”
Comedic Background: “Jazz Comedy”
Outro: “All That”
#ArtificialIntelligence #MachineLearning #ReinforcementLearning #AI #NeuralNetworks