Evolution simulator

Interactive code (replit) GitHub repository

Summary

This project was designed as a tool for KID Museum in Bethesda, MD for students to understand how evolution emerges from selection pressures.  It features a population of zorks (winged, giraffe-like, savannah-dwelling creatures) and allows the user to tweak parameters such as the severity of the environment, mutation intensity, reproductive habits, and the chance of random accidents killing a well-evolved zork or sparing a poorly-evolved one.

Once the simulation is complete, the user is presented with a set of eight graphs which illustrate how the population changed over time.

Note: Replit has been a bit inconsistent about supporting the matplotlib 3rd party package.  If you can't get the project to run on Replit, consider cloning it with GitHub and running it locally on your machine.

Parameter menu

Skills gained

This was my first time using a program to teach math concepts to students at KID Museum.  I learned how present input parameters in such a way that a novice can easily manipulate and tinker with them.

I learned how to use matplotlib to create an array of multiple plots in a single window, to allow for easier analysis of results.

Code snippet