Thursday, April 29, 2010

Interactive Weasel Program

In chapter 3 of his book The Blind Watchmaker, evolutionary biologist and atheist Richard Dawkins, introduced the Weasel Program. In The Blind Watchmaker, Dawkins attempts to refute the argument for the existence of an intelligent designer (or God) based on the complexity of living organisms. As part of his argument, Dawkins asks us to consider the short sentence from Shakespeare below.

METHINKS IT IS LIKE A WEASEL

Dawkins points out, that if one is given a type writer having on 26 capital letters and a space, the probability of typing the 28 character above at random is (1/27)^28, that is, less than 1 in approximately 1.2E+40. The possibility of typing such a string of characters at random is so small, that for all practical purposes, it is impossible. Dawkins then introduces the Weasel Program to show that while it is essentially impossible to randomly select the sentence, it is possible to evolve it using an algorithm of random mutation and natural selection called the Weasel Program.



The Weasel Program appears to generate information by using random mutation and selection and this is supposed to be a supporting argument for evolution. Wikipedia has a description of the algorithm here. Included in the Wikipedia article is a section for criticism. Unfortunately, the criticism is more of an ad hominem attack against one of the Weasel Program critics (Dembski) followed by a rebuttal. Since the authors of Wikipedia aren’t fair enough to offer real criticism of the Weasel Program, I will do it here.

CRITICISM

Probably the most obvious flaw in Dawkins line of reasoning is that the Weasel Program must be supplied with information to generate information. In fact, the only information it can generate is the information that was put in to it. If you put nonsense into the Weasel Program you get nonsense out, not information. The Weasel Program is just a conversion algorithm.

Dawkins’ argument assumes that you can start with something that automatically has the ability to reproduce itself. I thought the idea here was that life was represented by a meaningful sentence. Shouldn’t nonsense be considered dead an unable to reproduce?

Dawkins’ argument assumes that all the selected intermediate strings can reproduce even though he acknowledges that there are vastly more was of being dead than alive. If we were to enforce some rule for what is considered to be alive, like requiring the character string be composed of only properly spelled words, the Weasel Program wouldn’t be able to find a path to its expected output. To say that “there are vastly more ways of being dead than alive” would be a gross understatement because there would be easily billions of more ways of being “dead” than “alive”.

I could go on with a lot more criticism but I suspect I am already getting boring. I’ll leave the other issues for your discovery. You’ll find that the Weasel program doesn’t always converge.

IN DEFENSE OF DEMBSKI

Dembski was criticized for suggesting that Dawkins’ algorithm locks in matching characters. Since Dawkins source code isn’t available the only other way to prove that Dawkins didn’t lock in matching characters is to examine the selected intermediates and see if any of them have an unmatching character in a spot that once matched. I picked up a copy of Dawkins book to find out if this was the case and it isn’t. So we don’t really know if Dawkins’ initial algorithm locked in changes of not. What’s funny though is that I have read the source code for 10 implementations of the Weasel Program written by critics of Dembski and 4 of them inadvertently implemented a locking algorithm. I have written the algorithm both ways and you can choose which way to run it. You can play with my interactive Weasel Program and try out various input scenarios. One of the things you can discover by observing the Changes From Match results is that the Interactive Weasel Program only converges if the input parameters make the Weasel Program approximate a locking algorithm. In fact, Wesley Elsberry, one of Dembski critics cheerfully agrees that “approximating the outcome of a locking mechanism is done by any correctly-programmed” weasel program.

SOURCE CODE

The source code for this program is here. The software was written using Visual Studio 2010 in C#. Most of the source code is for presentation. The code for the actual algorithm is in Evolver.cs and you can view it using any text editor if you don't have Visual Studio 2010.