Natural Selection Simulator
Watch evolution happen. Creatures with genes for speed, size and sense search for food every day. Those that eat survive, those that eat twice reproduce, and children inherit slightly mutated genes. Change the rules, run an experiment and see which traits win.
Population
creatures foodClick a creature to inspect it. Space play/pause · N next day · F full screen
Population
creatures food birthsAverage genes
speed size senseGene distribution now
Speed × size
dot color = sensePick an experiment. The lab restarts with its settings and starts playing.
Change anything, then press Apply & restart. Same seed + same settings = same result.
Faces: eyes look where a creature is heading. Smile = has eaten, angry brows = hunting, wide eyes = fleeing, closed eyes = home or out of energy.
Export
How the simulation works
- Morning: food appears at random. Every creature gets the same daily energy and starts at its home on the edge.
- Faces: eyes look where a creature is heading. A smile means it has eaten, angry brows mean it is hunting, wide eyes mean it is fleeing and closed eyes mean it is home or out of energy.
- Search: each step a creature uses energy (see the formula). It walks randomly until food or prey enters its sense range, then heads straight for it. With predation on, it runs from bigger creatures.
- Going home: after eating enough to reproduce, or when its energy is only just enough to get back, it walks to the nearest edge. Creatures that run out of energy away from home die (if that rule is on).
- Evening: creatures that ate enough survive; those that ate enough to reproduce get one child with possibly mutated genes. Then the next day starts.
This is a simplified teaching model of natural selection, not a model of any real species. Everything runs in your browser.
Using Natural Selection Simulator
An interactive evolution lab. Creatures with genes for speed, size and sense look for food each day; those that eat enough survive and reproduce, passing on slightly mutated genes. Watch the traits change on a live canvas and charts, change the rules and export the data.
- Pick an example experiment such as Speed race, Speed vs sense or Big eats small. It starts playing immediately.
- Watch the arena: green dots are food and colors show the chosen gene. Click any creature to see its genes, energy and what it is doing.
- Read the charts: population and food per day, average genes with their spread, the current gene distribution and a speed × size scatter.
- Use Skip to compute 10–250 days instantly, or Next day to go one day at a time. Speed changes how many steps run per frame.
- Open Experiment settings to change the world, which genes can mutate, survival rules, predation and the energy formula, then press Apply & restart. Download the per-day data as CSV or a PNG snapshot.
Example
Speed race: with 50 food for 20 creatures, average speed rises from 1.0 and settles near 3, because faster creatures reach food first but burn energy as speed². Big eats small: with predation on, average size grows while speed stays modest, since size³ makes large bodies expensive to move.
Questions & answers
How does the simulation work?
Each day food appears at random. Every creature starts at the edge with the same energy, walks randomly until it senses food (or prey), and pays energy each step. Eating 1 food lets it survive, 2 lets it reproduce. Children inherit the parent's genes, each with a chance of a small random mutation.
What is the energy formula?
Energy per step = a × size³ × speed² + b × sense. Size³ × speed² behaves like kinetic energy (mass × velocity²), so fast or big creatures run out of energy sooner. You can change a, b and the daily energy, and the calculator shows how far a creature can travel.
Can I repeat an experiment exactly?
Yes. Every run uses a seed. The same seed and the same settings always give the same result, so you can change one setting and compare fairly.
Why does a population go extinct?
If there is too little food, movement is too expensive or creatures must return home but run out of energy, nobody survives. Add food, lower the cost or reduce the food needed to survive.
Can I use the data in Excel, Python or R?
Download Data CSV for one row per day with population, births, deaths, starved, stranded, eaten by predators and the mean and standard deviation of every gene. The settings are written in the first line.
Is it scientifically accurate?
It is a simplified teaching model, not a model of a real species. It shows real principles — variation, inheritance, selection and trade-offs — and lets you test how rules change the outcome.
Does it run on my device only?
Yes. The whole simulation runs in your browser; nothing is uploaded. Very large populations (over 1,000) may slow down older phones.
Help improve this tool
Report a problem or suggest an improvement
Describe the issue without pasting private tool input. Feedback goes to our admin inbox.
