Skip to content

detiuaveiro/flappy-bird-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flappy Bird AI Agent

Course: Intelligent Systems II - University of Aveiro

This repository contains the framework for developing and training intelligent agents to play Flappy Bird using Neuro-evolution.

Key Features

  • Backend: High-concurrency Python server using asyncio and websockets.
  • Frontend: Real-time game visualization using HTML5 Canvas.
  • AI Core: A custom implementation of Genetic Algorithms (GA) and Multi-Layer Perceptrons (MLP) to evolve optimal playing strategies.

Usage

Setup

git clone https://github.com/detiuaveiro/flappy-bird-agent)
cd flappy-bird-agent
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Backend

In a terminal run:

source venv/bin/activate
python -m src.backend [--pipes] -n <number_of_players> -l <limit>

Training

In a terminal run:

source venv/bin/activate
python -m src.train -n <number_of_players> -e <number_of_epochs> -a [ga|gwo|egwo|de|pso]

Playing

In a terminal run:

source venv/bin/activate
python -m src.play -l <model.json>

Documentation

This library was documented using the google style docstring. Run the following commands to produce the documentation for this library.

pdoc --math -d google -o docs src 

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Flappy Bird AI Agent (Intelligent Systems II): A neuro-evolutionary framework to train intelligent agents for Flappy Bird. Features a high-performance Python backend (asyncio/websockets), real-time HTML5 visualization, and a complete pipeline for evolving Neural Networks using Genetic Algorithms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors