Neural Network - Flappy Bird AI

Project Description

This project was created with the purpose of assisting my understanding of Machine Learning and Neural Networks.

The input of the AI contains 2 neurons, which are the distance and height differential of the next obstacle respectively. The singular output neuron tells the AI when to flap.

The AI uses asexual reproduction with mutation chance as the evolutionary method. The mutation will ensure that the performance of the AI does not plateau from saturation of the gene pool.

This project was written entirely by me in Unity without any plugins. There were a few goals I wanted to accomplish with the creation of this project:

  • To understand the methodology behind neural networks.
  • To apply and map neural networks to a game AI.
  • To understand evolutionary algorithms.

There were also a few other takeaways from the creation of the project.

  • Understood multi-dimensional Jagged Arrays from the creation of the network.
  • Learned the concept and creation of deep copies of arrays.
  • Understood the uses of a SIgmoid function in normalizing values.