2022
1 day
A quick weekend side project inspired by a YouTube video demonstrating a simple self-driving neural net in Unreal Engine. It got me wondering how challenging it would be to implement something similar using Blueprints. After some quick research, I felt confident enough to give it a shot.
The neural network receives input from five distance samples collected using line traces, arranged in a semi-circular pattern in front of the vehicle, along with the vehicle’s current velocity.
I used a neuroevolutionary approach to train the network, scoring each car based on how far it managed to drive, with bonus points awarded for passing selected checkpoints. After each generation, the top 25% of performers are selected to "reproduce", with their weights slightly mutated based on a defined mutation rate that would decrease overtime.