https://github.com/matrixsmaster/flappy_neat
Flappy NEAT is a testbench where neural networks learn to play a game using a mix of genetic neuro-evolution and reinforcement learning.
https://github.com/matrixsmaster/flappy_neat
ai delphi7 genetic-algorithm reinforcement-learning
Last synced: 8 months ago
JSON representation
Flappy NEAT is a testbench where neural networks learn to play a game using a mix of genetic neuro-evolution and reinforcement learning.
- Host: GitHub
- URL: https://github.com/matrixsmaster/flappy_neat
- Owner: matrixsmaster
- Created: 2025-06-09T21:22:50.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-15T11:46:57.000Z (12 months ago)
- Last Synced: 2025-08-05T15:40:07.981Z (10 months ago)
- Topics: ai, delphi7, genetic-algorithm, reinforcement-learning
- Language: Pascal
- Homepage:
- Size: 313 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ค Flappy NEAT

**Flappy NEAT** is a chaotic little testbench where neural networks learn to play a Flappy Birdโstyle game using a mix of **genetic neuro-evolution** and **reinforcement learning**. Itโs designed to let you:
- Compare **human**, **algorithmic**, **neuro-evolved**, and **RL-trained** performance
- Seamlessly switch from **evolution** to **RL fine-tuning** once a score threshold is hit
- Experiment with unique genetic operators and learning tricks you've probably never seen before
Itโs a research toy, a performance benchmark, and a testbed for weird ideasโall in one.
---
## ๐ง Highlights
- ๐ **Alpha-selection**: A novel genetic operator to drive better diversity
- ๐ฅ **Neuron heat dynamics**: RL weight updates are modulated by how โhotโ neurons are
- ๐งฌ **Custom crossover/inversion/mutation logic**
- ๐ฉ **Interactive human mode** for score comparison
- ๐ค **Algorithmic solver mode** (perfect agent)
- ๐งช **Experimental PPO-inspired RL strategy**
- ๐ **Hybrid GA โ RL transition** based on fitness threshold
- ๐ ๏ธ **Live UI** with parameter tweaking
- ๐ **Help system** built into the UI with all information needed to understand every parameter
- ๐ **Save/load for agents and populations**
- ๐ **Neural network visualization and weight matrix viewer**
- ๐ **Scenario replay support for post-mortem analysis**
---
## ๐ ๏ธ Running the Project
### A precompiled `.exe` is provided with each release - you can run it directly in windows or WINE.
This program was built using **Delphi 7**, which means:
> โ ๏ธ You will need a **Windows XP environment** with **Delphi 7** installed to compile and run this project.
We recommend spinning up a virtual machine for this purpose. Nostalgia points are included for free.
---
## ๐งช Sample Use Case
Train a population to solve the level using evolution, then transition into RL for fine-tuning behavior. Compare its score to your own flapping skills, or the perfect algorithmic solver. Discover if your `AlphaSort` operator beats standard crossover methods. Watch neuron "heat maps" influence updates. Or just... create a mutant bird that flaps with pure chaos.
Hint: Try to use test INI files provided in the repo.
### (C) Dmitry 'MatrixS_Master' Solovyev, 2025
### License: GPL v3