Description
Warning: This game is a work in progress! I'm using Rosie, an AI assistant, to help with learning and completing the game development process.
Flappy Bird AI: An Evolutionary Learning Experience
How it works:
1. Game Setup:
- The game creates a population of 200 birds, each controlled by its own neural network.
- The scene includes a sky gradient, a city skyline, and grass for visual appeal.
2. Neural Network:
- Each bird has a neural network with 3 input nodes, 6 hidden nodes, and 1 output node.
- Inputs: Bird's y-position, closest pipe's y-position, and distance to the closest pipe.
- Output: Decision to flap (jump) or not.
3. Game Mechanics:
- Birds fall due to gravity and can flap to move upwards.
- Pipes spawn at regular intervals and move from right to left.
- Birds must navigate through gaps between pipes.
4. Learning Process:
- Each generation, birds attempt to fly through the pipes.
- Fitness is calculated based on how long each bird survives.
- The top 20% of performers are selected as "parents" for the next generation.
5. Evolution:
- New birds are created by copying and slightly mutating the neural networks of successful parents.
- This process repeats, with each generation potentially becoming better at the game.
6. Scoring:
- The game tracks the current score, best score, and generation number.
- Scores increase as birds successfully pass through pipes.
This AI-powered version of Flappy Bird demonstrates principles of machine learning and genetic algorithms. Watch as the birds evolve their strategies over multiple generations!
This description provides an overview of the game's key components and mechanics, explaining how the AI learns to play the game over time. It also includes the requested warning about the game's development status.