Methinks it is like a weasel
Hamlet: Do you see yonder cloud that’s almost in shape of a camel?
Polonius: By the mass, and ’tis like a camel, indeed.
Hamlet: Methinks it is like a weasel.
In attempting to discredit evolution by natural selection, creationists have often described the impossibility of random mutations in DNA being capable of anything beneficial as the equivalent of a tornado in a junkyard accidentally building a 747 or a group of monkeys bashing the keys of a typewriter to successfully write the works of Shakespeare.
And they’re right. If evolution was merely random mutations then it would be unfathomably impossible for life to evolve as it does. But here’s the rub: no evolutionary biologists claim that random mutations alone cause the diversity of life we observe. This is where the crucial natural selection part comes in. Evolution occurs by random mutations, most of them neutral, where any beneficial mutations are selected for by the environment and those successful mutations go on to have more children who will likely inherit those beneficial mutations. And so on and so on.
To illustrate the point, back in 1986 Richard Dawkins in his book, The Blind Watchmaker demonstrated a simple program which he named ‘Weasel‘ as a reference to the concept of monkeys and typewriters and the above quote from Shakespeare. ‘Weasel’ starts with a jumble of letters, spawns ‘children’ from them (i.e. multiple copies), each with slight mutations and selects whichever ‘child’ is the most similar to a target phrase to spawn a new generation of children.
The point of the program was not to demonstrate every aspect of evolution by natural selection (that’s rather too much to ask of a small page of code), just the power of mutation when combined with a selection process as opposed to brute-force random chance.
Below I’ve created a simple version of Dawkins’ program that is limited to a single word and which will, due to the limitations of Javascript and browsers, only attempt a maximum of 500 generations. Have a play around to get a feel for how random mutations can result in very non-random outcomes when there is a selection criteria combined with heritability.
If you know how to run Python and want to check out a version closer to that of the original ‘Weasel’, take a look at the one created by fellow blogger and PhD student in evolutionary genetics, David, over at The Ativism. His is not limited to 500 generations like mine and he includes the newer concept of the option of ‘locking’ successful mutations.
Tags: dawkins, evolution, natural selection, weasel

Cool
I notice when I put in 0.1 for mutation rate it converts that to 10% – is it possible to see smaller mutation rates?
Incidentally have you seen the documentary of the Blind Watchmaker? It is on youtube (part 1 here): http://www.youtube.com/watch?v=EG-7SDb_8Wo. Part 2 covers the “methinks it is like a weasel” programme from memory.
Also speaking of blind watchmakers and computer programmes, this video by CDK007 is one of my favourites: http://www.youtube.com/watch?v=mcAq9bmCeR0
Ian, good catch. I’ve fixed it so that any percentage above zero will work.
I must check out those videos too! Cheers.
Wicked Cool! (and thanks for the shout out, you may have just doubled my technorati ranking, top 150 in Ken’s list here I come…)
The “locking” bussiness in my one is not so much a new feature as the thing Dembski had accused Dawkins of doing – shielding letters that already matched the target from the effects of mutation – I was just staggered (for some reason) they hadn’t bothered to actually implement and see if it made a difference.
BTW, I always liked the biomorphs more, seems like Dawkins did too:
I still cannot conceal from you my feeling of exultation as I first watched these exquisite creatures emerging before my eyes. I distinctly heard the triumphal opening chords of Also sprach Zarathustra (the 2001 theme) in my mind. I couldn’t eat, and that night “my” insects swarmed behind my eyelids as I tried to sleep
Top shelf on the ‘intelligent design’ of that programme, Damian
(ba doomp ching!)
I’m curious about the concept of a ‘target phrase’? Biologically speaking, there are no ‘target’ organisms correct? Only organisms which survive/replicate in the current environment, right? Might just be semantics (I’m always picky with words!)?
But quite apart from that, (and without meaning this in a gap-picking/expanding sense) the power of mutation (via replication) makes the formation of the first replicator all the more of a “giant leap for
manbio-kind!”Hi Dale,
Dale, I’ll snip in before Damien provides his answer
I’m curious about the concept of a ‘target phrase’? Biologically speaking, there are no ‘target’ organisms correct? Only organisms which survive/replicate in the current environment, right? Might just be semantics (I’m always picky with words!)
Yeah, Dawkins was specifically addressing the “if a hurricane blew through a Boeing shed you wouldn’t get a 747 argument”, the weasel algorithm is simply meant to show that random change + cumulative selection is orders of magnitude more creative than chance alone. In “for real” evolution there is no global optimum that each generation is measured against but fitness can be modeled as landscape . In some genetic algorithms you can define the fitness of ‘offspring’ as their ability to solve some problem (like winning a game of checkers!) rather than a human mandated goal. You frequently end up with a solution you wouldn’t have guessed at (and sometimes you can’t even see how it works).
Thanks for that David!
Indeed, I agree that the 747 argument misrepresents (or doesn’t grasp? or just forgets?) natural selection. I suspect that some of those ‘arguments’ (if you can call them that!) are reactionary repsonses to implications by folk like Dawkins that natural explanations in general (evolutionary explanations in the particular case of biological complexity) not only are in conflict with (all!) religious explanations, but have replaced them (all!).
I suppose that’s what happens when someone (atheist or creationist) tries to use science for something science isn’t good at (proving religious or a-religious convictions)…
Dale, I’ve read a few of Dawkins’ books and I believe that he started off going about the business of simply talking about evolution as any scientist would do and it was only after repeatedly falling victim of creationist quote mining that he went on the offensive. The God Delusion is really the only place he tackles religion front on. I recommend anyone read any of his books to get an excellent understanding of evolutionary biology; he writes well.
Yes I’ve heard much praise of his other books. (did I mention any of his books?) I’m referring to the sort of things he says in his opening statement to the Dawkins-Lennox 07 debate (and still says).
Refresh my memory?
I have a full quote on my computer at church, but he talks about religious explanations being outdated, and replaced by science and natural explanations. I might be in the office this afternoon, and will find it and paste in in here (the quote it’s not too long, but I got a good deal of it to not mis-represent the context)
One more thing, I wanted to be clear that I’m not accusing Dawkins of ‘casting the first stone’, and provoking the creationist response. I’d suspect that the sort of sentiments above (natural/scientific explanations both in conflict wtih and replacing religious ones) goes back waaaay further than Dembski and Dawkins… From my shallow understanding of the history of thought, I’d say it goes back to (duh-duh-duh…) “the Enlightenment” and the changes in thinking that followed
…or you can watch it here:
http://www.dawkinslennoxdebate.com
I’ve just watched his introductory speech and I’ll transcribe the bit that I think you are talking about.
First, a bit of context. He says near the start that he was drawn to science not because he was particularly interested in ‘pressing flowers’ but because of an interest in some of the ‘big questions’ like that of our existence and how we got here.
And now the quote:
The ‘religious’ explanation for how we got here as explained in your Bible and as was understood by everyone who features in the Bible was that man was made from mud and that everything was magicked into existence in six days.
Half of Christianity (only half!!) these days has recognised that this is not literally true and has accepted the truth as revealed by the scientific method as to how we got here.
And, sadly, whenever someone like me tries to put something out there in an effort to clearly explain some of the Christian misconceptions of how evolution works it seems that the people who try to undermine it the most are those in that half of Christianity who apparently agree in the first place!
Any creationist reading this blog post will see my explanation and have a deep feeling of cognitive dissonance at the clear illustration of how evolution is not just a random process. But upon further reading will see your comments about how Dawkins’ tries to use science to replace religion or some such and they’ll immediately forget that there was this naggingly valid argument against their wrong-headed creation beliefs because you, the reasonable Christian, have turned it into a polarised Dawkins-is-bad scenario. I know this is how it works because I’ve been one of those people who’ve sheltered behind the conviction of other, more ‘reasonable’ Christians even when we’ve fundamentally disagreed on a simple matter such as evolution.
As you may imagine I find this extremely frustrating.
Dale,
Would you agree that religion has overstepped the mark in the past, claiming explanation for many of the facets of the world around us? Explanations which were eventually expunged by modern science?
From my perspective, religion had it coming, and rightly, too. Not for getting it wrong in the first place, but for hanging on in denial so stubbornly so long.
I think the triumph of modern knowledge/science largely owes it’s success to the emancipation from gap-pointing.
Your question at the end of post 4 is exactly that; a gap-pointing question (in Affect), and the motivation behind it, I think, is a philosophy which would -inadvertantly perhaps – stymie further discovery. There is no reason – except the wish for that philosophy to be true – to expect that that information came about by purely ‘natural’ means. In fact, given the history of science, it would be foolish to bet against it. (There are many reasonable hypotheses about how information can ‘increase’)
Sorry that all sounds quite agressive. I do agree with you, though, that it would be amazing to discover how life started. What I wish is that everyone could see the beauty in it even AFTER we discover it just as I wish that everyone could see that the world is MORE beautiful for our discovery of natural selection.
Hi Damian,
I hope you’ll agree that my initial comment (#4) was genuinely a clarifying one on the issue of the mechanisim of natural selection. The responses to my comment (naturally) clarified that the algorithm mainly counters the 747-ish arguments, which (naturally) raised the sort of ideological clashes I mentioned (comment #’s 6, 8, 10).
And also, whilst a creationist reading all this might feel some ’shelter’ from me regarding their general belief in a creator, they clearly would not feel any from me regarding their specific belief in a 6-day creation event. So, I don’t really think the purpose of your post (clarifying how evolution ‘works’) has been thwarted or undermined, and I don’t think that they will immediately forget the good points above about the mechanisms of evolution. Having said all this, I am remorseful that you’re frustrated.
Moving on, since you bothered to transcribe the Dawkins quote and comment on it, I will take that to mean that the topic is worth at least some of your time/effort, and post the extended quote I mentioned earlier (which you’ve rightly selected, though I will provide his later sentiments).
Simon,
As far as religious and scientific ‘explanations’ are concerned, I think whilst some religious explanations (really ‘interpretations!’) are in conflict with science, I reject the notion that all of them are. The key things here are a) the diversity in religious explanations and b) that religious and scientific explanations are not at the same level.
Precisely because they are at different levels, I also reject the notion that religious explanations necessarily impede the progress of science. And in the same vein, I couldn’t agree more that discovering how something works, does not at all take away from its beauty but enriches it! For me (and many others) this is true also not only of beauty but of what Dawkins calls the impulse to attribute it to a Creator. I find science to enrich my beliefs, not emancipate me from them.
Dale, I’m sorry for the underlying frustration in my comment above. I’ve got a few other stresses at the moment and, whilst I’ve always been bugged by this ’sheltering’, I wouldn’t normally let it get the better of me. I guess now you know!
Sorry bro for taking it out on you personally.
no sweat, Damian
I didn’t feel personally attacked!
Dale,
Largely agreed. Surely you agree, though, that there is overlap of religion and science??
If you and I were both religious and living pre 1850s we would both have significant problems with Darwin’s theory, no? Certainly I’d grant you that our interpretations of religion might be ‘wrong’, and that they would be wrong to exactly the degree that they inhibit the truth; science in this case.
However. I put it to you that the awe that a pre 1850s religious person might precipitate into a statement about the origin of life would look very similar to your exhortation in post 4. Both statements would be close to making the move of crystallising and reinforcing the religious doctrines/stances of the day (Discovery institute today?); the very doctrines and stances which, if one is to learn from history, should be questioned.
Wouldn’t it be great to again unite science and religion? I do wonder, though, that they’ve never been split(!)
Hi Simon,
I think religion and science are two ways of talking about the same things. In terms of Steven Jay Gould’s ‘NOMA’ concept, I’d want to say that the ‘magisteria’ of science and religion are related – the question is how…
I’m not up with the history of opposition/support for Darwin throughout the years, but I think I recall somewhere seeing/reading/hearing that initially there was little criticism of it?
As for uniting (or at least ‘relating’?) science and religion, I’ve a growing interest in Natural Theology – and I recommend Alistair McGrath on this.
Dale,
Mmmnn….
Yes, I think Dawrin’s theory was initally ignored until it was realised that it contradicted the bible.
Ah, thanks! I’d heard the term but never knew what natural theology meant. I looked it up.
The slant in my comment of uniting science and religion was to suggest that in actual fact the ‘correct’/best theological views have always produced the goods in terms of investigating the natual world. The islamic world 700 – 1200, christianity 1600 and onwards, and secularism today.
very interesting perspective, Simon