In this project, I worked with a team of four to create a genetic algorithm that would teach a car to drive around a track using proportional control. There were two main components to the program:
1) Genetic Algorithm:
This part of the program was modeled after natural evolution. Each "generation" consisted of 15 cars that were controlled in various ways. Each group of 15 cars was simulated, and the best two were selected to move on to the next generation. These best two moved on to create the next generation through mixing their characteristics and mutation.
2) Car controller:
Each car was controlled using proportional control. There is a sensor on the front, left and right of each car that determined the distance to the wall. A matrix of six coefficients turned these three values into a speed value for the left wheel and the right wheel. These coefficients then determined the location and heading of the car.
We also created a website to showcase the project: http://rileychapman.github.io/geneticCar/
This video shows the final program:
1) Genetic Algorithm:
This part of the program was modeled after natural evolution. Each "generation" consisted of 15 cars that were controlled in various ways. Each group of 15 cars was simulated, and the best two were selected to move on to the next generation. These best two moved on to create the next generation through mixing their characteristics and mutation.
2) Car controller:
Each car was controlled using proportional control. There is a sensor on the front, left and right of each car that determined the distance to the wall. A matrix of six coefficients turned these three values into a speed value for the left wheel and the right wheel. These coefficients then determined the location and heading of the car.
We also created a website to showcase the project: http://rileychapman.github.io/geneticCar/
This video shows the final program: