In one of my first forays into Python I decided to make a script that draws random pixels until it creates art. It was part of my experiments involving Genetic problem solving (more on that later probably). This is not by any stretch of the imagination a Genetic algorithm, but it was a start. Basic principe: Draw a pixel at a random position in a random color, compare to original, if it’s close enough: keep it, if it’s not: throw it out.

To keep the time it needed to run to a minimum I used 100x100 versions of the original artwork After about 50.000 iterations of this you get a pretty accurate representation of the original artwork.

The Mona Lisa Best guess after 50000 iterations

Guernica Guernica

Sunflowers Sunflowers

Sunrise Sunrise

I can’t tell the difference, really…

I’m not even entirely sure what my point was here. Roger Johansson actually made a way cooler solution to this that I found after writing mine. My horribly written python code can be found on github