Number of Alleles for Each Generation

Allele Frequency for Each Generation

About the simulation

This simulation is designed to demonstrate genetic drift and gene flow in a finite population. Each cell in the grid represents an individual in the population, and its color represents a unique allele. As the simulations runs, you can obverse the allele frequencies in the population shifting as the colors of individual cells change over time.

Running the simulation


  • To begin the simulation, press “Start”
  • The stop the simulation, press “Pause”
  • To randomly generate a new initial population and begin the simulation again, press “Reset”
  • You can also edit the mutation rate used during the simulation.
  • To create a barrier on the grid, simply click on the cell in which you want to barrier to appear.
  • To remove a barrier, simply click on the cell again. To learn more about barriers, see “Barriers” below
  • To force a mutation to occur on a cell, click on the cell while holding the SHIFT key. To learn more about mutations, see “Mutations” below


In this simulation, barriers represent physical landmarks on which individual can’t live. Cells that are marked as barriers will not be copied into neighboring cells, and neighboring cells cannot be copied onto barriers. Therefore, constructing a line of barriers would create a physical line across which cells cannot be copied. Barriers may then be used to force speciation to occur by isolating sub-populations.

  • You can create a barrier by clicking on any cell.
  • You can click and drag to create a barrier in many cells.


  • You can adjust the mutation rate used by simulation.
  • The mutation rate should be realistically low. If the mutation rate is too high, you will see many colors on the grid being repeated for distinct alleles.
  • Bright neon colors are reserved for cells with mutant alleles.
  • You can force a mutation to occur on a cell by clicking on the cell while holding the SHIFT key. If you click and drag, you can force the same mutation to occur in many cells.