Self-parking car using genetic algorithm (2021)
In this article, a self-parking car is trained using a genetic algorithm. The first generation of cars are created with random genomes, which initially behave randomly. Around the 40th generation, the cars begin to learn and approach the parking spot more effectively. However, they still hit other cars and don't perfectly fit in the spot. The article provides a simulator for observing the evolution process.
The self-parking car is developed using a genetic algorithm to evolve the car's genome, which consists of 180 bits. The car requires two types of muscles to move: engine and steering wheel muscles. The brain sends signals to these muscles, with three possible values: -1, 0, or +1. The brain receives distance sensor data every 100 milliseconds, ranging from [0...4].
The brain uses a simple Linear Polynomial function to convert the sensor data into muscle signals. The coefficients of the polynomials, [e0, e1, ..., e8] and [w0, w1, ..., w8], determine the car's behavior and form its unique genome. The car's genome can be modified through the genetic algorithm to improve its parking abilities.
While the neural network approach could make the car smarter and more adaptable, the simpler Linear Polynomial function is sufficient for this demonstration. The car's genome defines its behavior, and the coefficients of the polynomials control how the brain converts sensor data into muscle signals.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.