The Artificial Intelligence was made using NEAT - Neural Evolution Augmenting Topology (a neural network that progress each generation). For more informations, read: NEAT-Python’s documentation.
To understand the config.txt file, access: Configuration file description.
The code was made in Python, using the "paygame", "on", "random" and "neat" libraries.
To run this project, we have two options:
- AI Plays
- Download de SmartBirdAI.py file and the folders "images" and "config".
- Install neat:
pip install neat-python
- version used: 0.92 - Install pygame:
pip install pygame
- version used: 2.3.0 - Run the SmartBirdAI.py file (Visual Stuio Code recommended).
- You play
- The same, but using the SmartBird.py file
Here we have an image of the AI playing the game. We have the 2º generation of Smart Birds trying to progress in the game. We also can see the score of the generation.
At the end of game, it shows the best generation and its score.
This project has this tutorial as base:
playlist - Inteligência Artificial no Pyhton
- I added a final score screen with the informations of the best generation.
- I changed the bird image used when AI is playing.
- The fundamentals of the Neural Network.
- How to use NEAT and Pygame libraries.
- How to recreat the Angry Bird game.