A genetic algorithm in C++. Written my senior year in High school, my second year into coding.
Small project I created for fun my senior year of high school using C++. It tests a creature’s fitness in “the wild” based on certain traits such as speed and endurance, among others. After a generation is ranked, a death function is used to decide who dies, with some randomness. Then the creatures reproduce and pass on their traits with some variance and mutation. Keeping track of mean, median, mode, and range, the program was able to be run until a certain condition was met, such as the mean score of a generation reaching x. If re-doing the program, I would add a better UI and add graphing functionality.