Generation Prompt
Page: Neuroevolution - Flappy Bird AI
Slogan: "Neural networks that learn through natural selection"
Structure:
- Widget before:title → h1 + p.slogan centered
- Widget left:history → Fitness history graph (canvas)
- Widget left:network → Neural network visualization (canvas)
- Widget right:stats → Statistics (generation, best score, alive)
- Widget right:controls → Settings + Play/Reset + Batch training
- Main → section.neuro-container with canvas 600×400
- Widget after:algorithm → Algorithm explanation
- Widget modal:claude → Documentation
Controls:
- Population: 10-200 (default 50)
- Mutation: 0-100% slider (default 20%)
- Network: dropdown (6/8/8→4/4→8/6→6/8→6→4)
- Activation: dropdown (ReLU/Tanh/Sigmoid)
- Speed: dropdown (0.5x/1x/2x/4x)
- Show Best: checkbox
- Play/Pause + Reset buttons
- Batch training: count input + Train button
Keyboard:
- Space: toggle play/pause
- Escape: stop batch training
Game loop:
1. Birds decide to jump based on neural network output
2. Physics: gravity, velocity, collision detection
3. Dead birds removed, score = frames survived
4. All dead → next generation (selection, crossover, mutation)
5. Max score (65535) → auto-win, end generation