Past EED rants

Labels

Live leaderboard

Poker leaderboard

Voice of EED

Friday 27 March 2009

Mutating weasels, and admitting mistakes


Over twenty years ago now, back in 1986, Richard Dawkins released his book "The Blind Watchmaker". I've blogged about this before: an excellent book, second only to "The Ancestor's Tale" in terms of sheer readability and good old fashioned, enjoyable science.

In this book, Dawkins attempts to dispell the "junkyard tornado" fallacy, the old creationist canard that usually goes something like this: "The chances of a tornado blowing through a junkyard and forming a complete Boening 747 from scrap parts is 1 in [very large number]. So the chances of natural selection being able to create fully formed creatures randomly is similarly unlikely!"

Dawkins tackles this by way of an analogy. Imagine we're looking to generate a phrase: "METHINKS IT IS LIKE A WEASEL" (a random phrase from Shakespeare's Hamlet, in case you were wondering). One way we can do this is by sitting a monkey in front of a typewriter and having it type out random strings of 28 characters. This is an analogous mechanism to the spontaneous generation misunderstanding that creationsists have about evolution.

Obviously, this is going to take some considerable length of time. There are some 10^40 possible combinations that the monkey could stumble upon. In fact, if the monkey was working really hard and producing one 28 character string per second, it would take somewhere around the age of the universe to get to it. Obviously, this isn't a very efficient search mechanism.

Luckily, this isn't how natural selection works. Dawkins goes on to contrast this "random search" with the idea of "cumulative search". Cumulative search works by starting with a reproducing parent - in this case, a random string of characters - and producing offspring from it. The offspring are then subject to mutation - in this case, some of the letters in the phrase can change into other ones. Finally, the offspring are inspected and their fitness is measured - fitness here is closeness to the target phrase, "METHINKS IT IS LIKE A WEASEL". The fittest of the brood is then used as the parent for the next generation. And so on, until the target is reached.

Dawkins illustrates this with a simple computer programme. It is a remarkably simple algorithm, so I spent ten minutes knocking together my own weasel code. Here's a sample run from it:

Initial Parent: ZZXZNXT CRZGXSNFBCMOVBXBK W
Generation 20: Best offspring: ZTJINKS ITPIXULFVD A WEASEW
Generation 40: Best offspring: YTJINKS IT IS LZZB A WEASEL
Generation 60: Best offspring: MYTJINKS IT IS LKKB A WEASEL
Generation 80: Best offspring: MTTHINKS IT IS LKKE A WEASEL
Generation 100: Best offspring: MSTHINKS IT IS LRKE A WEASEL
Generation 120: Best offspring: METHINKS IT IS LRKE A WEASEL
Generation 140: Best offspring: METHINKS IT IS LINE A WEASEL
Target reached in 153 generations: METHINKS IT IS LIKE A WEASEL

This shows the fittest offspring for every 20th generation (for completeness, the parameters of this run had each generation consist of 50 offspring, and each character in each offspring had a 5% chance of mutating). You can see that using cumulative search, we reach the target in just 153 generations. This is massively more efficient than generating phrases at random!

This is, very loosely, how natural selection works. By small modifications to offspring, then selection for the fittest offspring in their particular environment, complexity can be gradually accumulated - there is absolutely no need to invoke any junkyard tornadoes.

Ultimately though, weasel is just a clever toy - a simplistic view of natural selection used only to illustrate the power of non-random selection. It is not a very good model of how evolution really works, since each generation of offspring's fittness is measured with respect to a distant ideal. In fact, it is perhaps a little misleading when taken out of context since evolution doesn't work towards a perfect ideal. It is a blind process that has no target or goal. Most of the world therefore enjoyed a clever demonstration, learned the limited lessons that weasel has to offer, and moved on.

But not the creationists.

Over at Uncommon Descent, intelligent design creationist William Dembski (the self-styled Isaac Newton of Information Theory) perpetuates a long running mistake of his. Dembski has long attempted to dismiss weasel as a misleading and irrelevent model of cumulative selection. Back in 2000 he published an essay containing a description of the algorithm:
(1) Start with a randomly selected sequence of 28 capital Roman letters and spaces (thats the length of METHINKS IT IS LIKE A WEASEL); (2) randomly alter all the letters and spaces in the current sequence that do not agree with the target sequence; (3) whenever an alteration happens to match a corresponding letter in the target sequence, leave it and randomly alter only those remaining letters that still differ from the target sequence.
Now, Dembski's mistake isn't necessarily easy to spot, but it is there. Firstly, his (2) suggests all characters mutate, when in fact all characters are subject to a chance of mutating. More importantly, his (3) claims that a kind of "latching" occurs, that whenever a correct letter is found, it is somehow locked in place and not subject to further mutation.

This might not seem important at first, but consider this: if weasel is claiming to be a simulation of natural selection (it isn't really, but there you go...) then what is the process that locks the characters in place supposed to represent? An intelligent intervention? Dembski seems to be claiming in this paragraph that weasel's search algorithm is more supportive of an ID position than a naturalistic one.

Of course, the reality is that no "latching" of letters occurs in a real weasel algorithm. No such mechanism was described by Dawkins in 1986, and indeed no such mechanism occurs in my algorithm above. In fact, if you compare a real-weasel with a latching-weasel, the number of generations to reach the target is not much worse for real-weasel. Certainly still massively better than random search. It has become something of a badge of honour among scientists to write your own weasel algorithm, just simply to confirm to yourself how good this method is, even without latching.

So Dembski's insistence that latching occurs is confusing, since Dawkins himself has long since refutted the claim, and countless versions of real-weasel have shown that the result was consistent. Indeed, Dembski had this error pointed out to him back in 2000 and many times since. He's failed to act on it though, and has even gone on to reproduce the error in subsequent (non-peer reviewed) papers.

In his latest post, Dembski links to a youtube clip (start around 6:00) that explicitely shows each generation, and as such sometimes shows a supposedly "fixed" letter changing into something else. This is clear proof that Dawkins algorithm was not of the latching kind. But even now, Dembski cannot admit his error. He innocently wonders:
That leads one to wonder whether the WEASEL program, as Dawkins had programmed and described it in his book, is the same as in the BBC Horizons documentary.
Nice conspiracy theory: Dawkins wrote a programme that cheated in order to produce results that are practically the same as a non-cheating version, then subsequently re-wrote the programme for television to not cheat. Hilarious!

I don't understand the problem here. Weasel would have been forgotten by now if Dembski had admitted his mistake in 2000. It isn't a good simulation, it is simply a demonstration of a concept. His "science" doesn't depend on weasel being right or wrong. And he's been shown countless times, over and again, that he's wrong. So why not just admit this one tiny mistake? The truth is, Dembski seems so invested in finding flaws with anything Dawkins related that his mindset simply will not allow it. Not a very good example from the Isaac Newton of Information Theory eh?

0 comments:

Post a Comment