This is a small Shiny app that illustrates mutation, selection, and genetic drift at a single locus.
For some exposition on the model, see the blog post:
https://martinsbioblogg.wordpress.com/2017/05/14/mutation-selection-and-drift-with-shiny/
app.R contains the Shiny app, and simulation.cpp contains a C++11 version of the simulation code.