How the AI works
Two populations — 100 prey and 20 predators — each evolve their own neural networks with a genetic algorithm. There's no shared goal: predators are rewarded for catching, prey for surviving.
Inputs → outputs
- Inputs: relative positions/directions of the nearest few agents.
- Outputs: movement direction and speed.
Co-evolution
Because both sides evolve at once, an arms race emerges: better hunting pressures prey to flee smarter, which pressures predators to hunt smarter — emergent behavior nobody coded.
What you see on screen
By around generation 30, you can watch coordinated hunting and evasive flocking appear on their own.