See the about section for more details.
Press S to download the AI's Tensorflow model
Move the slider to adjust the game speed
This AI was trained using N.E.A.T. This is a genetic algorithm that trains the AI by creating generations of agents and simulating them in a environment. Each bird has a Neural Network that will decide to make the bird flap based on its inputs. The birds with the best Neural Networks are selected for the next generation and slightly mutated to create new behavior.
This project was made using P5js to render the game and TensorFlow js to create the Neural Networks.
The code for this project can be found Here.
Each bird has a Neural network that determines whether to flap or not. This network is a sequential model made up of three dense layers. An input layer with 5 neurons, a hidden layer with 8 neurons and a output layer with 2 neurons.
The five inputs the bird receives are:
The output layer has a softmax activation and will return two values that will add up to one. The bird will flap if the first value is greater than the second and will not if the opposite is true.
The training process for this AI involves: