Neural Networks for Path Planning

As the world moves towards autonomy, one field that is at the forefront is that of self-driving vehicles. These vehicles take information regarding their environment from various sensors and use it to navigate through complex situations. In this project, complex environments are generated in the form of random tracks, and we use a Feed-Forward Neural Network to train a model car that can successfully navigate these tracks without collisions.

This project was done by a team of 3 people, as a part of the Artificial Intelligence course at WPI.

For this model, we used the NEAT algorithm, and 2 hidden layers. This allowed us to train the model in a reasonable amount of time, without losing model accuracy. The input parameters to the network are the distances to track boundaries as well as any other obstacles, and the output parameters are for changing the direction of the car, i.e. turning left or right. The simulation is done with the help of PyGame, a python module often used for videogames.

Generation of random tracks exists in various video games and simulators. One technique that is often used is Procedural Content Generation. For the purpose of this project, the algorithm was adapted to generate appropriate tracks. The tracks designed included straight and curved paths. The track had a uniquely colored starting line (blue) which acted as a marker. Image processing was performed on the image of the track to identify the location and orientation of the starting point, as it would vary for each track.

Image of a Randomly Generated Track

The model car was tested on the tracks that were generated using Procedural Content Generation so as to overcome overfitting. The car could anticipate the curves and reduce speed accordingly such that it does not collide with the walls, however, traversal through very sharp turns took a few iterations to master. The model was trained such that after the completion of one circuit, it would run on another circuit after gaining knowledge from the previous one. This loop was repeated and the results showed that that the number of iterations required by the model to complete the same track was fewer than the iterations required when the model was run on each track, individually.

Modeled Car Traversing a Randomly Generated Track