Self-Driving Vehicle Setup
Using Genetic Algorithm to evolve a Neural Network Vehicle to drift around in an enclosed circuit.
The image below is a link to the following youtube video: https://www.youtube.com/watch?v=Yx6JVTKVl0M
- The God.c script decides the population size and mutation probabilities
- When the sim starts, N individuals are spawned with a randomly initialized Neural Network (NN)
- For every Update() cycle, the individual calculates Steering & Throttle inputs from the NN
- If the individual crashes into the wall, it stops and waits for all other individuals to crash
- Once all the individuals crash, random pairs are picked from the population, with the one gone farthest, having the highest probability
- Then iterate through each NN Weight and if a random float is greater than pCrossing, exchange the Weights
- Do this till the population of the new individuals is again N
- Run the next generation
- GeneticVehicleDrift/Source/Genetic_DriftCar/God.cpp
- GeneticVehicleDrift/Source/Genetic_DriftCar/GeneticAlgorithm/DriftPawn_1HL.cpp
- AdvVehicle from UE4 starter content tuned for high-slide-angle drifts
- Custom Neural Network
-
Genetic Algorithm Simulation's configuration modifiable (in God.cpp):
- Initial Population
- Number of distance-sensor-units (Input Layer)
- Crossing Probability
- Mutation Probability
- Number of nodes in Hidden Layer
- Drift score multiplier (to +/- the importance of drifting in the simulation)
- Have UE4 (4.21) installed
- Clone/Download the repository
- Go to directory
- Open GeneticVehicleDrift.uproject