Evolution Lab ๐งฌ
Ninety creatures. Random DNA. One apple, guarded by a wall. Nobody tells them where to go โ the ones that get closest simply have more offspring, mutation adds new ideas, and within a dozen generations they discover the route. That is machine learning in its rawest form, live in your browser.
Purple dots are alive ยท grey hit a wall ยท teal reached the food. Nobody programmed a path โ fitness + mutation discovers one, usually within ~15 generations.
What you are actually watching
Each creature carries a genome โ a fixed list of tiny thrust instructions, one per tick of its life. Generation one is pure chaos. But fitness is measured (how close did you get to the apple? how fast?), parents are selected in proportion to it, genomes are crossed over and occasionally mutated, and the population improves with zero understanding of what an apple, a wall, or a goal is.
This is a genetic algorithm, one of the oldest ideas in AI, and the intuition transfers directly to modern machine learning: define a score, search a huge space of possibilities, keep what works. Neural networks are trained with calculus instead of reproduction, but the spirit โ improvement without instruction โ is identical. Try cranking the mutation slider to maximum and watch evolution forget everything it learned.
Frequently asked questions
Is this real machine learning?
Yes โ a genetic algorithm, a classic optimization technique from the 1970s that inspired parts of modern AI. The creatures genuinely learn the route through selection and mutation; nothing is scripted.
Why do the creatures sometimes get worse?
Evolution isn't a straight line. High mutation rates destroy good genes as fast as they create them, and luck matters in small populations. Watching it struggle is half the lesson.
What does the mutation slider do?
It sets the chance each gene randomly changes between generations. Too low and the population stagnates; too high and it can't retain what works. The sweet spot in between is a deep principle of all learning systems.
Enjoyed playing? Learn how it works.
If watching dots learn made something click, imagine building the real thing. These courses start exactly here.
Disclosure: AI Fun Lab is a Coursera affiliate. If you enroll through these links we may earn a commission at no extra cost to you. It keeps the games free.