Peppered Moth Simulation

Processing 2013

As its name suggests, Peppered Moth Simulation is a simulation of the evolution of peppered moth programmed in Processing. Each finch consumes a random moth with weighted probability influenced by how much the moth contrasts from its background. Each moth is replace with a new moth with color matching the average of the population with chance for a small mutation.

One slider on the top-left controls the playback speed of the simulation, while the other controls the shade of the background such that the user can observe the simulation dynamically affect the population.