Where Vector Math Meets Virtual Drones
A mesmerizing real-time simulation that brings Craig Reynolds' classic boids algorithm to life with a military twist! Watch hundreds of AI-powered (it's not deep AI but classical algorithms are still AI right? However rudimentary) UAVs dance through the sky using nothing but pure mathematics and emergent behavior.
This isn't just pretty pixels moving around โ it's computational biology in action! FleetMind implements several fascinating mathematical algorithms:
The heart of the simulation uses three fundamental vector calculations:
- Cohesion: Each drone calculates the center of mass of nearby neighbors and steers toward it
- Separation: Inverse-square distance calculations create repulsive forces to prevent collisions
- Alignment: Velocity vector averaging helps drones match their neighbors' direction and speed
Building on top of basic flocking, we've added military-inspired hierarchy using:
- Weighted steering forces that vary by rank (commanders > squad leaders > drones)
- Distance-based authority gradients with different influence radii for each command level
- Multi-layered seek algorithms for chain-of-command following
Every frame processes thousands of 2D vector operations:
- Vector normalization and magnitude calculations
- Distance-weighted force interpolation
- Velocity limiting using vector projection
- Real-time obstacle avoidance using repulsive force fields
- Interactive playground: Click to add targets, watch the swarm intelligently coordinate
- Real-time parameter tweaking: Adjust the math coefficients and see instant behavioral changes
- Multiple mission modes: From tight formations to chaotic scatter patterns
- Emergent complexity: Simple rules create surprisingly sophisticated group behavior
Just open index.html
in your browser and watch the mathematical ballet unfold! No installation needed.
Built for the pure joy of watching algorithms come alive. Perfect for anyone who finds beauty in computational emergence.