A simple genetic algorithm written in modern C++ used to better understand vectors and smart pointers


A small program that attempts to evolve towards a determined fitness goal. A higher fitness increases the chance to reproduce, and every reproduction has a chance for mutation. Currently every generation is cleared from the pool, another option is to only clear the weakest in terms of “fitness”.

Source

Github

Video

Watch it in action!

Images

Program Start

Target

Generation 2

Generation 32

Generation 41