All AI games
🌀
GA

Maze Solver AI — Genetic Algorithm

How 200 walkers evolve move sequences to solve a random maze, with pheromone trails marking good paths.

Play the game

How the AI works

A genetic algorithm evolves 200 walkers. Each individual is a fixed sequence of moves (its "genome"); there's no neural network here — just selection on sequences.

Genome and fitness

  • Genome: a list of directional moves.
  • Fitness: how close the walker gets to the exit (and how quickly).

Evolution loop

The closest walkers are selected, their move sequences are crossed over, and random mutations tweak a few steps — so each generation drifts toward solving paths.

What you see on screen

Pheromone-style trails glow on frequently used cells, revealing the promising routes the population is converging on.

Need an AI engineer or data scientist?

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