Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cooldragon12/game-with-ai-using-neat
A Flappy Bird Clone added a AI using NEAT , The game have 3 modes.
https://github.com/cooldragon12/game-with-ai-using-neat
genetic-algorithm neat python
Last synced: 10 days ago
JSON representation
A Flappy Bird Clone added a AI using NEAT , The game have 3 modes.
- Host: GitHub
- URL: https://github.com/cooldragon12/game-with-ai-using-neat
- Owner: cooldragon12
- License: mit
- Created: 2024-02-22T13:23:09.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-05-21T12:57:30.000Z (6 months ago)
- Last Synced: 2024-10-15T21:14:08.324Z (22 days ago)
- Topics: genetic-algorithm, neat, python
- Language: Python
- Homepage:
- Size: 7.38 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flappy Bird - A Flappy Bird Clone with a NEAT AI
This is a simple clone of the popular mobile game Flappy Bird, made using the Pygame library. The game is controlled by a NEAT AI, which is a genetic algorithm that evolves a population of neural networks to play the game.
## Installation
Execute the following command to install the required packages:
```bash
pip install -r requirements.txt
```
NOTE: Use a python virtual environment to avoid conflicts with other packages.## Requirements
- Python 3.6 or higher
- Pygame 2.0.1 or higher
- NEAT-Python 0.92 or higher
- Tensorflow 2.16## Usage
To run the game, execute the following command:
```bash
python main.py
```## Folder Structure
### [assets/](assets/) Folder
Contains all the assets used in the game, such as images and sounds.- [**character/**](assets/character/) - Contains the images of the characters divided by the name of the character as folder.
- [**map/**](assets/map/) - Contains the images of the maps divided by the name of the map as folder.
- [**menu/**](assets/menu/) - Contains the images of the menu divided by the name of the menu as folder.
- [**fonts/**](assets/fonts/) - Contains the fonts used in the game. We use **retrofix** font for the game.
### [flappy_bird/](flappy_bird/) Folder
Contains the objects used in the game. Includes the behavior of the bird, the pipes, and the base.
- [**abstracts.py**](flappy_bird/abstracts.py) - Contains the abstract classes for the game objects.- [**characters.py**](flappy_bird/characters.py) - Contains the characters used in the game. This is where you configure the characters.
- [**objects.py**](flappy_bird/objects.py) - Contains the game objects, such as the character, the pipes, and the floor.
- [**maps.py**](flappy_bird/maps.py) - Contains the maps used in the game. This is where you configure the maps content.
### [game/](game/) Folder
Contains the main game loop and the game logic. Some of the configurations are also present in this folder.It is divided into the following files:
- [**menu.py**](game/menu.py) - Contains the menu screen and character selection logic. Including holding the selection of the user.
- [**environment.py**](game/environment.py) - Contains the game environment and the game loop, including the handling of the map and character.
- [**modes.py**](game/modes.py) - Contains the game modes, such as the AI mode and the player mode.
## Main File
### [main.py](main.py)
Contains the driver code for the game. It initializes the game and runs the main game loop.Note: Cchanges might be applied as we progress in the development of the game.