All AI games
🌿
GA

Predator–Prey AI — Evolving Neural Brains

How 40 prey and 4 predators evolve independent neural brains, producing emergent hunting and fleeing tactics.

Play the game

How the AI works

Two populations — 40 prey and 4 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 a Data Scientist or AI Engineer?

I build custom ML models, RAG chatbots, data pipelines, and production APIs — from analysis to deployment.