A live, continuously running population — not a diagram, and not a series of button clicks. Individuals wander, get hunted, and reproduce on their own clock, all at once, exactly like a real population's overlapping generations.
Natural selection is the process by which individuals with traits better suited to their environment tend to survive and reproduce more successfully, gradually shifting how common those traits are in the population. It requires variation that already exists — selection doesn’t invent new traits, it changes how frequent existing ones become. This simulation is modeled on a real, well-documented case: wild pocket mouse populations living on dark lava flows in the southwestern U.S. have measurably darker fur than nearby populations on light desert sand.
A crucial and commonly misunderstood point: no individual mouse changes color during its own lifetime to match its surroundings. What changes is which individuals survive long enough to reproduce. In the simulation, two red predators actively roam the space and steer toward the nearest prey they can detect — but detection itself depends on camouflage: a mismatched (poorly hidden) individual can be spotted from much farther away than one that blends in. Each surviving prey slowly gains energy, and once it crosses a threshold it reproduces on its own, spawning an offspring nearby that inherits its color. There’s no synchronized “next generation” button — births and deaths happen continuously and asynchronously, exactly like a real wild population, where older and younger individuals are always alive side by side.
Try switching the environment’s background and watching what happens: whichever phenotype blends in gets detected less often, gets eaten less often, and reproduces more — and its frequency should climb steadily in the chart below the simulation as time passes. The mutation rate slider matters too — it’s the only mechanism in the model that can reintroduce a phenotype after it’s been eliminated, mirroring mutation’s role as the ultimate source of new genetic variation in real populations.