Show HN: Predator vs. Boids

sankalp1999.github.io

2 points by dejavucoder 11 hours ago

Live Demo: https://sankalp1999.github.io/swarm-sim/swarm-simulation.htm...

Swarm Intelligence Simulation

Boids vs Predator with Evolution

Boids are artificial life forms following three simple rules:

- Alignment - Match direction with neighbors - Cohesion - Stay close to the group - Separation - Avoid collisions

The term "Boid" is short for "bird-oid object." The simulation and its underlying principles were developed by Craig W. Reynolds in 1986.

A predator hunts the swarm, forcing evolution. Boids that survive reproduce, passing on genetic traits like speed and evasion abilities. Successful boids automatically reproduce every ~15 seconds.

Key Features:

- Real-time evolution across generations - Self-attention mechanism for global awareness - Interactive predator control (arrow keys) - Emergent survival strategies

Watch as simple rules create complex, lifelike behaviors!