How devgabrielluiz/flappybird works
This repository is a Pygame Flappy Bird game with two runnable modes: manual keyboard play and NEAT-driven autonomous play. Each script contains its own game loop and game entities; the AI version additionally scores genomes, obtains pipe-relative inputs, and runs population evolution. The graph separates shared game mechanics, gameplay orchestration, and AI evolution. Edges are limited to relationships visible in the excerpts or README; image assets are shown as inputs, while NEAT and Pygame are external dependencies.
Main entry points: FlappyBird_with_IA.py AI game loop · FlappyBird.py Manual game loop · imgs Game images · configIA.txt NEAT configuration
Components 17
Manual Game
- Manual game loop
FlappyBird.py
Game Mechanics
- Bird physics
FlappyBird.py - Pipe and collision
FlappyBird.py - Scrolling ground
FlappyBird.py - Game rendering
FlappyBird.py - Bird physics
FlappyBird_with_IA.py - Pipe and collision
FlappyBird_with_IA.py - Scrolling ground
FlappyBird_with_IA.py - Game rendering
FlappyBird_with_IA.py
NEAT Learning
- AI game loop
FlappyBird_with_IA.py - Network decisions
FlappyBird_with_IA.py - Population evolution
FlappyBird_with_IA.py - NEAT configuration
configIA.txt
Other components
- Player
- Pygame
- NEAT library
- Game images
imgs
Connections 21
- Player → Manual game loop: presses keys
FlappyBird.py - Manual game loop → Bird physics: moves
FlappyBird.py - Manual game loop → Pipe and collision: checks collisions
FlappyBird.py - Manual game loop → Scrolling ground: moves
FlappyBird.py - Manual game loop → Game rendering: draws frame
FlappyBird.py - Bird physics → Pipe and collision: provides mask
FlappyBird.py - Manual game loop → Pygame: uses
FlappyBird.py - Manual game loop → Game images: loads
FlappyBird.py - AI game loop → Bird physics: moves
FlappyBird_with_IA.py - AI game loop → Pipe and collision: checks collisions
FlappyBird_with_IA.py - AI game loop → Scrolling ground: moves
FlappyBird_with_IA.py - AI game loop → Game rendering: draws frame
FlappyBird_with_IA.py - AI game loop → Network decisions: activates
FlappyBird_with_IA.py - Bird physics → Pipe and collision: provides mask
FlappyBird_with_IA.py - AI game loop → Pygame: uses
FlappyBird_with_IA.py - AI game loop → Game images: loads
FlappyBird_with_IA.py - Population evolution → AI game loop: runs fitness
FlappyBird_with_IA.py - Population evolution → NEAT library: configures population
FlappyBird_with_IA.py - Population evolution → NEAT configuration: loads
FlappyBird_with_IA.py - Network decisions → NEAT library: creates network
FlappyBird_with_IA.py - AI game loop → Population evolution: updates fitness
FlappyBird_with_IA.py