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.


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.


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.


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.


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.


At 2:57 PM, May 27, 2010, Blogger Kel said...

I wonder why you put the mutation rate so high. A low mutation rate for longer strings works a lot better... Makes sense too, when there's 27 possible combinations any mutation can take and you put several mutations in the same string, how is it going to hit the predefined target?

At 11:08 AM, May 28, 2010, Blogger Intelligent Designer said...

Hi Kel,

You must have installed Silverlight. In that case I hope you try out Genomicron.

I choose the 5% mutation rate as the default rate because that was in the Wikipedia specification which I presumed was the specifications Richard Dawkins used.

At 4:28 PM, May 28, 2010, Blogger Kel said...

In that case I hope you try out Genomicron.
I have. Not really sure what you're trying to prove with it, though.

At 7:45 PM, June 18, 2010, Blogger Kel said...

I don't know if you've read The Blind Watchmaker, but I was able to replicate the exact same number of generations in the example Dawkins provided using your program on the suggested settings Dawkins used.

A while back there was a post at Uncommon Descent calling for Dawkins to release his source code (as if the gesture meant anything). Have you posted this over there showing that it works?

At 8:40 PM, March 24, 2011, Blogger Dave said...

Reading this blog is like traveling back in time a couple of decades. Come on, 'Weasel' is so yesterday.

Time to move the discussion beyond 'Weasel'!

Much more here.

At 10:09 PM, August 30, 2011, Blogger Intelligent Designer said...

Since the Weasel Program is so yesterday maybe you folks over there at should stop talking about it. It wasn’t too long ago that you guys at practically had a Weasel Program writing party. Not to mention that your people are busy making sure that Intelligent Design folk like myself can’t voice any criticism of the Weasel Program on Wikipedia.

I read the posts you wrote over at which are referenced in your comment above. Your argument is easily refuted. However, has banned me from making comments. If you are open to debate, remove the ban against my comments at and I will be more than happy to provide a refutation.

Having said that, I would also like to say thank you for visiting my blog. I also welcome any further comments you might have and would be especially interested in any criticism of Genomicron.

At 10:06 PM, September 06, 2011, Blogger Dave said...

Randy, the main reason "Weasel" is still discussed at Panda's Thumb is simply because you intelligent design creationists still think it has something to do with disproving evolution.

If you have aggravated the Panda's Thumb crew to the point of getting yourself banned, you must have pulled some doozies! I doubt I can convince the crew to forgive your trespasses.

If you really think you can demonstrate that my work proving genetic algorithms can solve difficult problems WITHOUT having the solution(s) available the whole time "is easily refuted," why not state the reasons on your own blog - right here?

You can start by "easily refuting" my article in Skeptical Inquirer Vol. 34.3, May/June 2010, "The War of the Weasels: How an Intelligent Design Theorist was Bested in a Public Math Competition by a Genetic Algorithm!", online here:

My algorithm easily bested ID's best algorithmers in a week-long open-book test. I doubt you can do any better.

At 11:32 PM, September 06, 2011, Blogger Intelligent Designer said...

Hi Dave,

Like a lot of people I am busy. If I am going to take the time to post a refutation I prefer a bigger audience.

If you read through my comments on PandasThumb you will find that I endured all kinds of insults and almost always responded politely. Also PandasThumb has the ability to moderate comments by moving them to the bathroom wall. Very few of my comments have been moved there. I am guessing that you probably know the people that decided to ban my comments. Feel free to link to those offensive comments I made on PandasThumb that got me banned in a follow up comment.

It turns out that I rarely commented on PandasThumb and I wasn't able to find the blog entry where a few of my comments were sent to the bathroom wall. However, if anyone is interested in the kind of comments I make on PandasThumb, they can check out the comments in the link below.

If PandasThumb did not ban my comments because I was being rude, why did they ban them?

At 8:29 PM, September 09, 2011, Blogger Intelligent Designer said...

Hey Dave,

I found that PandasThumb post where my comments were sent to the bathroom wall right here. As far as I can remember, this was in fact the last time I was allowed to post on These comments could hardly be classified as being over the top. They may have been embarrassing for PZ Myers but I wasn't being rude or anything like that.

At 10:50 AM, November 27, 2011, Blogger Geoff said...

I tried a genetic algorithm for one-handed keyboard layout design. Thoughts welcome:

At 5:23 PM, November 27, 2011, Blogger Intelligent Designer said...

Hi Geoff,

I posted a comment on your blog but it didn't show up, nor did I get a message saying that it was moderated. You may want to verify that your Post Comments button is working properly. Below is the comment I tried to post on your blog:

It would be interesting to see how the solution keyboard would adapt to the size of a person’s hand or another language; especially if you allowed the keys to move from their standard positions and to have different shapes and sizes. However, I am sure that is way more work than you want to take on.

The downfall of this approach is that the kinds of solutions it can provide are limited and there are already way better solutions on the market than could ever be produced by this approach. For examples: T9, auto completion, and voice to text recognition.


Post a Comment

<< Home