The Fittest - Genetic Algorithm Demonstration Game

A screenshot from a program I developed.

A screenshot from a program I developed.
The Fittest
2014
Inspired by a natural selection activity that my wife did with her fifth grade class, this program demonstrates how a genetic algorithm works as an optimization technique. For the grade school activity, each student was given a paper cutout of a butterfly which they were instructed to color and place in the classroom. Each day a teacher acted as the preditor and took down a few of the butterflies. The last surviving bug won.
In my program, the bugs are the design, traits (speed, color, size, etc.) make up the chromosome, and survival is the fitness function.
To play the game the user clicks on bugs to eliminate them. After a handful of bugs have been killed, the survivors become the parents and crossover and mutation take place to create the next population. The user can view info such as traits of the most recently eliminated bug and how the traits have changed through the generations.
As part of the CAE Software Development class, I wrote this program from scratch - from the movement of each bug to the genetic algorithm to the OpenGL graphics to the UI. I used model-view-controller as the architecture for my program.