Skip to content

Flappy-AI: A simple project that applies reinforcement learning to train an AI agent to play a Flappy Bird-style game. This repository contains the core AI logic, game mechanics, and rendering code, organized across different directories for clarity. It's a great starting point in exploring the basics of AI in gaming.

License

Notifications You must be signed in to change notification settings

amc-madalin/flappy-ai

Repository files navigation

Flappy-AI with Reinforcement Learning

This is a project that uses AI to train an agent to play a game. The project is structured as follows:

  • ai/: Contains the code for the AI agent, including the Q network, replay buffer, and training logic.
  • assets/: Contains any assets used by the project.
  • configs/: Contains configuration files.
  • environment.yml: Contains the list of dependencies for the project.
  • experiments/: Contains any experimental code or data.
  • game/: Contains the game logic and rendering code.
  • model/: Contains the trained model.
  • runs/: Contains the output from training runs.
  • utils/: Contains utility code used across the project.
  • train.py: The main script to start training the agent.
  • test_game.py: The script to test the game without the agent.

Installation

  1. Clone the repository:
git clone https://github.com/amc-madalin/flappy-ai.git
  1. Navigate to the project directory:
cd flappy-ai
  1. Install the dependencies:
conda env create -f environment.yml

Usage

Activate environment:

conda activate flappy-ai

To train the agent, run:

python train.py

To test the game, run:

python test_game.py

License

This project is licensed under the MIT License.

About

Flappy-AI: A simple project that applies reinforcement learning to train an AI agent to play a Flappy Bird-style game. This repository contains the core AI logic, game mechanics, and rendering code, organized across different directories for clarity. It's a great starting point in exploring the basics of AI in gaming.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages