Evolution: Building SVG Images With Genetic Programming

September 16, 2013

Evolution is a program I wrote that tries to mimic a source image by randomly drawing polygons. At each step of the program it tries either adding a new polygon or randomly mutating one of the existing ones, keeping only the changes that make the image look more like the target than before.

This doesn't have much practical purpose, but it's a cool illustration of a genetic algorithm. Most of the program's parameters are configurable, too, so you can see how changes like doubling the likelihood of a new polygon being added during a mutation affect convergence.