Artificial Intelligence learns to play the game 'Flappy Bird' with the use of Neural Networks. This project also simulates evolution. The AI may learn to play it in the first generation, or possibly take up to 30 generations. HOW IT WORKS: 20 neural networks are generated randomly which are the brains for the AI players. They have no knowledge of what they are meant to do, they only receive several measurements as input, and come up with an output. There is only one output because the only game control is to jump. The output is a number between 0 and 1 which is rounded. 1 means jump, and 0 means not to jump. The player that did the best (highest fitness) is then chosen to have offspring for the next generation, which are all mutations of it. The best one out of those new players is then chosen to have offspring for the next generation. This process will repeat until the AI eventually learns how to play properly. This may take just 1 generation, or up to 30 generations.
NOTES: -Try changing the 'Mutation Rate' if the players do not evolve. Higher mutation rate means the players are more different to eachother. This can be good and bad. -More players increases the chance of the AI learning to play the game properly, but it may become laggy with more than 30.