Evolutionary Computing
How cool is it trying to reproduce a picture using evolutionary computing as an approach. Roger Alsing implemented it, showed it to the world, and got slashdotted for it. Receiving an increase of 120000 page views over the next few months.
I can understand some of you are not that familiar with evolutionary computing, so I will try to explain it a bit. As a student of Artificial Intelligence we are pretty familiar with these kind of problem solving approaches. In this case the “problem” can be described as to find a set of 50 semi-transparent polygons of different colors, sizes and locations in order to form look-a-like of a given picture.
The problem is now solved using a genetic algorithm, which sounds like we are using DNA and evolution in our computer code. But in fact, we just do that, why not? (Or we use an abstracted form of course, but the general idea is more or less the same.)
It is very simple. First we create a digital “organism” which has some sort of digital DNA. In our case in the Mona Lisa problem, this DNA is a set of 50 units. Every unit represents a polygon, and every polygon has parameters like its size, color and position in the drawing canvas. Now, if we would create such an organism with randomized polygons as its DNA, we could say that the organism represents a picture. Namely, the picture we get when we draw out all the polygons given the information of size, color and position represented in its DNA.
So now we have one organism, representing a random painting which will look like noise and chaos. Not much fun yet, is it? Well, lets not create one organism, but a population of them. Let’s create a thousand, all with randomly generated DNA, all probably unique. The thing now is that they aren’t doing anything yet, they just sit there. Why not let them have sex? Paintings can have sex too you know.
But as we all know, not every painting wants to mate with just some random other painting. And as god and creator of the computer program, we introduce a guideline, a pretty cruel one. Only the fittest paintings may sleep with one and other. In order to define this fitness, we say that a painting is more fit if it looks more like the Mona Lisa painting. In other words, every organism in our created world has some weird fetish for Mona Lisa.
The funny thing now is that we prohibit contraceptive devices in our little world. This new cruel law results in our mating organisms have children! These children will have a new set DNA constructed out of their parents, just like in our world. After this, we kinda kill the parents and the ones who weren’t fit enough. (If there wasn’t any moral talk to be said yet, it will now.)
When a set of parents is selected and they created offspring, one generation cycle has come to an end. What we beautifully see now, is that the next generation looks a little bit more similar to the Mona Lisa than the last. This is because of our fitness function: only the most similar to the Mona Lisa could reproduce themselves. This results in children which are also more similar to the Mona Lisa. Do you catch the drift?
Now we run close to a million generations. Every generation coming closer to representing the Mona Lisa more perfect. In the end we can select the fittest individual, which will look like the picture above!
What is solved here is of course a fun visualizable problem. If you dive into the web you’ll find loads of useful and intriguing applications of evolutionary computing. For example, I once followed a lecture at an University in Edinburgh about this topic where they successfully designed an optimized antenna. Antenna are all about form in order to catch a signal proper. In this case, the genetic algorithm found an oddly looking shape which no man could possibly have invented on its own. And this strange shape happened to catch a desired signal at best. (Edit 03-01-2009: I found the paper about this subject at NASA. “Automated Antenna Design with Evolutionary Algorithms”, at page 5 you’ll see a couple of evolved antenna!)
Well, as you can see I wrote quite a bit. During the holidays I happen to have some spare time left to invest here. If you have any questions regarding this subject, you can always post them in the comments, or email me personally. I would be happy to answer them. : ) Also, Roger Alsing put up his source code of the program on his site. He is still updating it, so if you’re interested, I’d suggest you take a look at his weblog!
Furthermore, some additional pictures after the jump about the progress over the generations! Full Story »










