Car Racer

Image of car simulation turning

Neural networks are a type of machine learning model, in which data is passed in, and that data is passed in through a network of weights, when applied creates nodes in the neural network. These weights are applied until we achieve output nodes, which is what we will be predicting in our classification problem. Convolutional neural networks (CNN) are a class of neural networks in which neural networks are applied to multidimensional data, such as an image. In this project, CNNs were used to train a model to drive a car in a small car racing game.

Keras was used to create, compile, and train the CNN model in this project. To create a model, I used Conv2D and MaxPooling2D layers and added layers hand tuning the amount of filters, kernel size, and activation function hyperparameters for the Conv2D layers, and the pool size hyperparameter for the MaxPooling2D layers. I also used two Dense layers after flattening the data to convert the output to a 7 length probability vector. After I finished that, I hand tuned the overall model hyperparameters such as early stopping, reducing learning rate, and validation size. Everything in the second cell of the notebook was done by me, and anything else was provided to me, such as the simulation of the model with OpenAI.

Doing this project I learned about how CNNs are used in image processing, and how they can be used in reinforcement learning. I also gained experience in hand tuning a neural network, as normally for the models I create I use built in methods from Sklearn such as cross-validation. This model is not perfect, as shown in the beginning of the video below, and can be improved by automating hyperparameter optimization, implementing k fold optimization, or hand tuning the hyperparameters more.

Source: PrestonTGarcia/CarRacer

Video: Preston Garcia: Car Racer