Skip to content

An AI is taught to beat a 2D car game with Genetic Algorithm for a NN

License

Notifications You must be signed in to change notification settings

swordey/Genetic2DCarGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genetic2DCarGame

An AI is taught to beat a 2D car game with Genetic Algorithm for a Neural Network.

Background

In this project a genetic algorithm generates 100 cars and 100 neural networks (NN). In each generation, the fittest species breed, trying to create better offspring. A little mutation is involved too.

  • The NN inputs are the state of the cars, that is the distance of the walls around the car in certain angles. It can be imagined as a lidar.
  • The output of the NN is the directions to move towards (left-forward, forward, right-forward).

Fun facts

  • As the NNs learn to move based on the distances of the walls around the car, it won't be track dependent.
  • Learning to navigate on a track, maybe enough, to navigate on newly generated tracks.

Built With

  • Python
  • pyglet - The cross-platform windowing and multimedia library for Python
  • keras - The Python Deep Learning library

Authors

  • Kardos Tamás - Initial work - Swordy

About

An AI is taught to beat a 2D car game with Genetic Algorithm for a NN

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages