All AI games
🌿
GA

Predator–Prey AI — Evolving Neural Brains

How 100 prey and 20 predators evolve independent neural brains, producing emergent hunting and fleeing tactics.

Play the game

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.

Need an AI engineer or data scientist?

I build custom ML models, AI agents, computer vision, and automation — from idea to production.