Saturday, June 14, 2008

Intelligent design in genetic algorithms

Recentluy, with the help of Programming Reddit, I found this YouTube video: "Evolution IS a Blind Watchmaker".

The aothor, cdk007, purports to show that Intelligent Design hypothesis is false. Mind you, at the very best he proved that that hypothesis is not necessary. However, in reality, the video illustrates two different, less important ideas: "genetic programming is hard", and "Intelligence hides in strange places".

In my programming life, I am periodically tempted to employ a genetic algorithm. And every time this happens, what stops me is the very hard task of writing the selection function. The hard part is keeping your ideas of what the answer should be out of your selection function. If you write it in such a way that _your_ solution gets advantage just because it's yours, you may as well code your solution directly.

This is what happened to cdk007. His stated selection function is "better measure time". However, then he goes on to give survival advantage to pendulums over other combinations of gears and rods. He even says: "Pendulums swing at a regular pace, therefore they can be used to keep time". Well, pendulums are very useful, but from the perspective of the Blind Watch Maker, this fact is not known! Pendulum not connected to any springs just hangs there motionless. From measuring of time point of view, this is no better than a spring that simply unwinds. In fact, it's worse, because at least the spring can be used as a sort of sand clock without sand.

So here is the real selection function: anything that moves is better than things that do not move. Things that move at an even pace are better than things that move fast at first and then slow down. Things that move at the right pace (say one rotation a minute) are better than those that are too fast or too slow.

The challenge would be to re-write the selection function on these lines, and see how many generations the clocks will take to emerge. If the code was in Python, or any other language that has a free environment, I'd do it myself. As it stands, I'll send an e-mail to the author. And then may be I'll have to do it myself anyway :) .

So in this particular case, the intelligent design was hiding in the selection function. You see, no one doubts that combination of mutation and selection can produce dramatic changes. You only have to look at any dog to get a proof. The problem with evolution is that it's hard to imagine how complex systems arose, thee systems that had to be composed of multiple mutations, where each individual mutation was indifferent or even detrimental to survival. The clock problem illustrates that the selection has to have knowledge about the future in order to produce the desired results.

There is even more interesting point in the clock video - the point of intelligence in the set of components. I'll consider it in another post.

No comments: