How oenzoribas/flappybirdai works
File structure
• Root directory
• neat.config.txt – NEAT algorithm settings
• neat_run.py – orchestrates training loop (population initialization, fitness evaluation, selection, mutation)
• run.py – launches an interactive, human-playable instance of the game
• models/ – stores serialized (“.pkl”) winners from different generations
• media/ – contains showcase videos and GIFs
• Project/
• assets/ – sprite images and other static resources used by the game
• game/ – core game logic classes:
– bird.py, pipe.py, base.py, score.py
• tests, build scripts, microservices – none present, indicating a monolithic, single-process application
README for additional insights
• Describes NEAT’s evaluation loop: environment provides observations → neural network decides jump/no-jump → environment computes fitness
• Lists dependencies: Python 3.8+, Pygame, NEAT-Python, Matplotlib
Elements
• Config → Trainer → NEAT Engine
• NEAT Engine ↔ Game Environment
• Trainer → Model Storage
• Model Storage → Manual Runner / Visualizer
• Green for ML components (NEAT Engine, Trainer)
• Blue for game components (Game Environment, Manual Runner)
• Gray for file storage (models, media)