Tue 31 May 2022
Available on GitHub
EARP is a program that uses evolutionary algorithm techniques to recreate an image using a limited number of semi-transparent polygons. The recreation images you see above has just 100 polygons in it!.
EARP is a spin-off from a second year University project that I felt deserved a bit more than what was on the brief.
The original project used the DEAP library and was implemented in python. The tuning of variables and for efficiencies was calculated using this implementation but, in car parlance, there's no replacement for displacement.
So a rewrite in Golang commenced and this is what I present to you.
Clone the Repo
git clone https://github.com/LukeBriggsDev/EARP
$ earp image_path no_of_polygons no_gens
$ earp images/darwin.png 100 1000
Here are some results after running the algorithm for 10,000 generations (Approx. 10 minutes on an 8-core M1 Pro) and limiting solutions to less than 100 polygons.
Here is a slightly harder image that was run for 20,000 generations