avinashkranjan / Amazing-Python-Scripts

🚀 Curated collection of Amazing Python scripts from Basics to Advance with automation task scripts.
https://amazing-python-scripts.avinashranjan.com
MIT License
2.74k stars 1.07k forks source link

[Script]: AI-driven AI Flappy Bird #2517

Closed Shikhar9425 closed 1 year ago

Shikhar9425 commented 1 year ago

Aim

In this game, we'll implement a simple AI that can play Flappy Bird using the NEAT (NeuroEvolution of Augmenting Topologies) algorithm, which is a method for evolving artificial neural networks.

Details

The birds use a simple neural network to determine when to jump. The neural network is fed with three inputs: bird's Y position, the distance from the bird to the top pipe, and the distance from the bird to the bottom pipe.

The NEAT algorithm will train the birds to play the game more effectively over generations. You can see the training process in the console output.

Record

Shikhar9425 commented 1 year ago

/assign