Generation Prompt
Page: Ant Colony Optimization - Swarm Intelligence Simulation
Slogan: "Follow the pheromone trails to discover emergent intelligence"
Structure:
- Widget before:title -> h1 + p.slogan centered
- Main -> Canvas in .card.full.ratio-16-9 (HD via devicePixelRatio)
- Widget right:stats -> Statistics (generation, ants, food collected, best path)
- Widget right:controls -> Start/Stop/Reset buttons
- Widget right:options -> Parameter sliders (evaporation, ant count, speed)
- Widget after:algorithm -> Algorithm explanation (ACO principle)
- Widget modal:claude -> Documentation
Simulation:
- Grid-based world with colony (home) and food sources
- Ants explore, collect food, return home
- Pheromone trails visualized as color gradient (intensity = color saturation)
- Two pheromone types: to-food (green) and to-home (blue)
Ant behavior:
1. If at food: pick up, switch to "returning" mode
2. If at home with food: deposit, switch to "exploring" mode
3. Returning: follow to-home pheromone + deposit to-food pheromone
4. Exploring: follow to-food pheromone + random exploration
Parameters:
- evaporationRate: 0.01-0.1 (default 0.02)
- pheromoneStrength: 1-10 (default 5)
- antCount: 10-200 (default 50)
- explorationBias: 0.1-0.5 (default 0.2)
Statistics tracked:
- Total food collected
- Current generation (simulation ticks)
- Active ant count
- Best path length found