UXP_FB_Logo copy.jpg

News

Training A Neural Network To Play A Driving Game

Training A Neural Network To Play A Driving Game

Training A Neural Network To Play A Driving Game

Training A Neural Network To Play A Driving Game

ByLewin Day

November 07, 2020

Originally Published Here

Summary

In these cases, it can make more sense to create a neural network and train the computer to do the job, as one would a human.

On a more basic level, [Gigante] did just that, teaching a neural network to play a basic driving game with a genetic algorithm.

The game consists of a basic top-down 2D driving game.

Given these 7 numbers, it calculates the outputs for steering, braking and acceleration to drive the car.

To train the AI, [Gigante] started with 650 AIs, and picked the best performer, which just barely managed to navigate the first two corners.

Marking this AI as the parent of the next generation, the AIs were iterated with random mutations.

Each generation showed some improvement, with [Gigante] picking the best performers each time to parent the next generation.

Within just four iterations, some of the cars are able to complete a full lap.

With enough training, the cars are able to complete the course at great speed without hitting the walls at all.

Gigante] points out that there's no need for a human in the loop either, if the software is coded to self-measure the fitness of each generation.

Reference

Day, L. (2020, November 07). Training A Neural Network To Play A Driving Game. Retrieved November 08, 2020, from https://hackaday.com/2020/11/07/training-a-neural-network-to-play-a-driving-game/