07 September 2009

Weasels, clouds and biomorphs, part I

There's usually no point in piling on when the minions of the ID movement get their just deserts after some typically brainless culture-war test launch. Consider the responses (by, most notably, Ian Musgrave at the Panda's Thumb) to the most recent rendition of the ID movement's hilariously idiotic fixation on a particular computer program written by Richard Dawkins. It seems there is little to add. But I think something important is being lost in this conversation, probably because the level of the "conversation" is the level of the ID movement. So let's start with a little quiz.

1. True or false: Richard Dawkins' 1986 classic The Blind Watchmaker used a computer model (a simulation) as a key teaching device while explaining the effectiveness of cumulative selection in evolution. The program is the main focus of chapter 3 ("Accumulating small change") of the book.

Answer: True.

2. True or false: the computer program used for this purpose was made available to the public and has since been adapted for free use on the web.

Answer: True.

3. True or false: the computer program in question is called WEASEL (or similar) and it demonstrates the stepwise generation of a famous phrase from Hamlet.

Answer: False.

Now if this surprises you, then either you haven't read The Blind Watchmaker or you haven't read it in a long time. Because even if you've been influenced by the hysterical antics of the ID crowd, you could not long believe its claims about the Weasel program if you had recently read the book. If you haven't recently read The Blind Watchmaker, you might consider a stroll through some representative ID musings on WEASEL followed by a visit to Chapter 3 of the book (and, if you have a copy from 1989 or later, a visit to the two appendices.) The experience could be jarring for those who have a positive view of these arguments by ID apologists.

But if you don't have a copy of The Blind Watchmaker handy, I can help. First, in this post, I'll discuss the Weasel program and its place in the thesis of The Blind Watchmaker – in the context of the current ID fixation on the program. Then I'll introduce the program that Dawkins really did emphasize in the book, a program called EVOLUTION (or later, when it was expanded and made commercially available, The Blind Watchmaker Evolution Simulation program) but commonly known as the biomorph(s) program. In the second post I'll talk more about the biomorph program and its usefulness.

Chapter 3 of The Blind Watchmaker is a tour de force of expository scientific writing. Called "Accumulating small change", the chapter has a single and simple thesis, laid out in the first paragraph:
We have seen that living things are too improbable and too beautifully 'designed' to have come into existence by chance. How, then, did they come into existence? The answer, Darwin's answer, is by gradual, step-by-step transformations from simple beginnings, from primordial entities sufficiently simple to have come into existence by chance. Each successive change in the gradual evolutionary process was simple enough, relative to its predecessor, to have arisen by chance. But the whole sequence of cumulative steps constitutes anything but a chance process, when you consider the complexity of the final end-product relative to the original survival. The purpose of this chapter is to demonstrate the power of this cumulative selection as a fundamentally nonrandom process.
The Blind Watchmaker, page 43, italics in the original
Dawkins immediately tackles the crazy misconception of evolution as a process that is akin to the impossibly improbable flying-together of the parts of a machine in a single step. Echoing Isaac Asimov, he calculates the probability of the spontaneous assembly of a hemoglobin molecule in a single step, and arrives at a number of predictably indescribable magnitude. It can't just happen.

In a 1987 BBC television show , he uses a much better metaphor: the opening of a safe by entering a combination. To open the safe, a banker (or thief) must correctly enter all of the correct numbers, in order, at the same time. His point is: of course it can't "just happen." The concept that Dawkins aims to communicate is this: from an evolutionary perspective, "success" doesn't happen all at once; it is accumulated. Evolutionary change is cumulative change; it's as though the safe opens a little when one correct number is entered, and allows the banker to reach in and get a little money. ("Small change" is the topic, remember.)

This is a very basic and very important aspect of the Darwinian mechanism, and yet it is maddeningly common to see it ignored or completely misunderstood. So in the first few pages of Chapter 3, Dawkins looks for an illustration of the difference between "randomly getting the whole thing right in one fell swoop" and "accumulating random improvements till the whole thing is assembled." He starts with the old saw about monkeys, typewriters and Shakespeare. Choosing a single phrase from Hamlet, "Methinks it is like a weasel," he first calculates the probability of a random character generator (a monkey) spontaneously banging out Hamlet's phrase. The calculation charmingly indicates that there isn't enough time in the universe for such a thing to occur. Yeah, yeah, yeah. Now, it's easy enough to get a computer (even a 1986-vintage machine) to churn out 28-character strings randomly, and so Dawkins describes a program that can do this. Then he introduces the occurrence of cumulative selection in the program, to illustrate its profound effectiveness compared to mere randomness.
We again use our computer monkey, but with a crucial difference in its program. It again begins by choosing a random sequence of 28 letters... It now 'breeds from' this random phrase. It duplicates it repeatedly, but with a certain chance of random error – 'mutation' – in the copying. The computer examines the mutant nonsense phrases, the 'progeny' of the original phrase, and chooses the one which, however slightly, most resembles the target phrase... the procedure is repeated, again mutant 'progeny' are 'bred from' the phrase, and a new 'winner' is chosen.
The Blind Watchmaker, pages 47-48, italics in the original
Dawkins shows that this procedure can get from a random monkey-phrase to "Methinks it is like a weasel" in mere seconds. And the point is simply this: cumulative selection is more effective than mere "randomness" by incomprehensibly gigantic magnitudes. Dawkins makes it very clear that the Weasel program is meant to demonstrate nothing more than that. After pointing out that single-step selection would take a near eternity to type the phrase, he reiterates the simple purpose of the comparison, and the whole weasel exercise:
Actually it would be fairer just to say that, in comparison with the time it would take either a monkey or a randomly programmed computer to type our target phrase, the total age of the universe so far is a negligibly small quantity, so small as to be well within the margin of error for this sort of back-of-an-envelope calculation. Whereas the time taken for a computer working randomly but with the constraint of cumulative selection to perform the same task is of the same order as humans ordinarily can understand, between 11 seconds and the time it takes to have lunch.
The Blind Watchmaker, page 49, italics in the original
Folks, that's all the silly weasel thing was ever about. So what's all the fuss then?

Well, some ID partisans are all agitated about whether Dawkins' program allowed mutations in positions of the string where the correct letter had been hit upon. They wonder: if cumulative selection had gotten us "Methinks it is like a measel", could 'measel' mutate back to 'measer' and thus take the program a step away from the target? And why does this matter? Well, for Dawkins' purposes it really doesn't matter, but the ID scholars seem to think there's a big speed difference. If you're interested you can read some nice work by Wesley Elsberry or Anders Pedersen that shows clearly that it simply doesn't matter.

But. Here's what's lost in all this. Dawkins never intended the silly little weasel exercise to be a persuasive argument for evolution as it actually occurs in the world. In fact, he is quick to point out why it's deficient (remember Bohr models of the atom in grade school?), noting that it is "misleading in important ways." And at that point, he abandons the Weasel program in favor of a simulation that is far better. That simulation, the Biomorph program, is the topic of the entirety of the rest of Chapter 3 of The Blind Watchmaker (and of my next post).

The absurdity of the ID fixation on the Weasel program is hard to capture with mere words. Perhaps this table will help put the two programs into better perspective.

WeaselBiomorph
Number of times program is mentioned* on Uncommon Descent4442
Number of pages devoted to program in The Blind Watchmakerless than 5 45, including two appendices

*All I did was Google the word 'weasel' or 'biomorph' at uncommondescent.com. The two uses of 'biomorph' were in comments by ID critics (one being Wes Elsberry). The uses of 'weasel' surely include insults that aren't references to the program.

The real focus of Chapter 3 of The Blind Watchmaker is the biomorph program. Seven figures, 23 pages, 22 more pages in two appendices which include a small user's manual for the program. The biomorph program constitutes the heart of Dawkins' book and his argument, so much so that the program is named The Blind Watchmaker. The Weasel program was a tiny stepping-stone for Richard Dawkins, a simplistic teaching tool meant to illustrate a single simple point. It's a hill to die on for the ID movement, and that says a lot about the state of that confused community.

17 comments:

John Lynch said...

Nice post Steve! I linked and am looking forward to Part II.

Mike Haubrich, FCD said...

What I was trying to find on the UD site was a reason for them to want the original program, and found very amusing the implication that in "refusing to release the original program" they were echoing the Obama-Birthers in their call for an irrelevant bit of programming.

Suppose they found a "latching" that Dawkins hadn't discussed, would then the edifice of Darwinism crumble? I never have been able to discern what they hope to gain.

Nice explanation, Steve.

Anonymous said...

Nice post Steve.

By the way, has anyone seen the new ICR recruit, Nathaniel Jeanson, straight from Harvard with a molecular biology PhD?
There are even some videos on youtube from a talk he gave recently;
http://www.youtube.com/watch?v=NCVE5BwBrUk
http://www.youtube.com/watch?v=FnQDQs3Fp_Q

It's always rather intrigued me why such people really bother to get such impressive scientific qualifications when they clearly have no intention of actually using them.

wrf3 said...

I, too, read the article and comments on the UD site. I even ventured a few remarks. I think the reason why there was a big "todo" over Weasel was due to the paper that Dembski and Marks recently had published dealing with conservation of information in searching. It is their thesis that you can't get more out of a search than is put into it. IIRC, part of Dembski's paper dealt with searches that "latch" information; that is, once part of a solution is found, that piece doesn't change for the rest of the search. Weasel enters the picture because it appears to latch information; in many examples, once the right letter is found in the right place, it doesn't change. The UD'ers wanted to see the source code to Dawkins program to see if the latching was explicit.

In isn't -- it's a byproduct of the mutation rate, the maximum number of copies per generation, and the maximum number of generations. I threw together a bit of LISP code to duplicate Weasel and what I found was that it never found the target string. My code wasn't wrong; what I found was that I had naively picked "bad" parameters for the mutation rate and copies per generation.

I think we all agree that Weasel isn't representative of evolution, since Weasel embeds the target in the search. Nevertheless, I think it's interesting that the parameters have to be tuned in order to get the algorithm to work. That is, the use of randomness to achieve a result had to be designed.

A few days later, I was reading Knuth's "Things a Computer Scientist Rarely Talks About" and on page 185 he writes: "Indeed, computer scientists have proved that certain important computational tasks can be done much more efficiently with random numbers than they could possibly ever be done by any deterministic procedure. Many of today's best computational algorithms, like methods for searching the Internet, are based on randomization."

Is the watchmaker truly blind or is randomness part of a sophisticated algorithm? Can we tell?

AMW said...

For what it's worth, The UD post that you link to links to a video of Dawkins' code in action. It is very apparent that correct letters could be mutated to incorrect letters, as it happens numerous times on tape. You don't need to see the code to infer that part of the algorithm.

Gabe Moothart said...

wrf3,

Is the watchmaker truly blind or is randomness part of a sophisticated algorithm? Can we tell?

I've thought a lot about this too. One of the things that research in genetic algorithms has taught us is that they work. Another thing they've taught us is that they don't "just work". They have many parameters which must be finely tuned. The "No Free Lunch" theorems even formalize this.

Dembski's recent work has been focussed not on proving that evolution doesn't work, but on proving that the environments in which it works (performs better than blind search) are so few and far between that we have no reason to expect it to work.

This is, surprisingly, more of a fine-tuning argument than an anti-evolutionary argument. At the end of the day we may be forced to conclude that evolution has happened, but that in order for it to happen, our environment had to be carefully selected for a particular end.

MidwifeToad said...

Looks like the UD crowd showed up here to display their inability to follow a ten line BASIC program. Five minutes with Welsey Eslberry's version of Weasel will demonstrate that fine tuning of parameters is unnecessary.

http://www.antievolution.org/cs/dawkins_weasel

Nor is it necessary to have a specific target. My own version of Weasel has no specific target, but it does have a fitness function. Fine tuning isn't required for it either.

AMW said...

I wouldn't say there's much fine tuning needed. I tried various combinations of population size (pop) and mutation rate (MR) to get convergence within 200 generations. The phrase I used was "IN THE BEGINNING GOD CREATED."

The baseline pop is 100 and the baseline MR is 4%. Holding MR constant at the baseline, I got convergence with a population of 30. Holding pop constant at the baseline, I got convergence with a MR of 0.5%.

Higher populations are no problem. Use a population of 10,000 (MR = 4%) and you can get convergence in a couple dozen generations. Higher MRs can be problematic if your pop isn't large. This is because if the MR is large relative to the pop, there is the danger that every offspring of a given generation is less fit than their parent. Even so, with the baseline pop a MR of 12% will get convergence within 200 generations. With a pop of 1,000 I got convergence with a MR of 20%.

So with a population between 30 and infinity (with MR = 4%) you can get quick convergence. With a MR between 0.5% and 12% (with pop = 100) you also get quick convergence.

As I said, this isn't really a story about fine tuning.

wrf3 said...

Consider the statement by AMW: "With a pop of 1,000 I got convergence with a MR of 20%."

Reduce the population rate to 100 (the rate used for a 4% MR) and convergence is highly unlikely.

I find it fascinating that there are now comments to the effect that "Weasel doesn't need to be tuned" while at the same time explaining the effective range of some of the parameters.

AMW said...

Allow me to clarify. My point wasn't that Weasel works for any parameters. It was that it works for a wide variety of parameters. So it needs to be tuned, just not fine tuned. In other words, if the parameters were selected by chance alone, we would be throwing at a dartboard with a pretty big bull's eye.

AMW said...

Oh, also, I'm not sure how unlikely convergence is with pop = 100 and MR = 20%. I just know Weasel doesn't seem to converge in 200 generations. Given more time and patience on my part, convergence might still be possible with those parameters.

wrf3 said...

AMW said: Oh, also, I'm not sure how unlikely convergence is with pop = 100 and MR = 20%.

I am. In 1,000 trials of up to 10,000 generations, 100 children per generation with a MR of 20% never converged.

I just know Weasel doesn't seem to converge in 200 generations. Given more time and patience on my part, convergence might still be possible with those parameters. and It was that it works for a wide variety of parameters. So it needs to be tuned, just not fine tuned. In other words, if the parameters were selected by chance alone, we would be throwing at a dartboard with a pretty big bull's eye.

The point is that you don't know - you don't know the range of parameters for which it converges; you guess that it's "a wide variety". This isn't science, it's storytelling.

A mutation rate of 25% and above with up to 187 children per generation will fail to converge with up to 10,000 generations. Brute force simulation is slow; I'm going to change the algorithm to do a binary search on the population to find out where higher mutation rates start converging; if ever. I suspect that a lower bound where no convergence is ever seen will be around a 20% mutation rate. A mutation rate of 17.5% needs around 150 children/generation in order to have odds of approximately 1 in 500 of converging.

The bullseye is a lot smaller than you think it is. And this is for a simple example that doesn't begin to match the complexity of living things. Nature is tuned. Physicists have been having to deal with this for years.

AMW said...

The point is that you don't know - you don't know the range of parameters for which it converges; you guess that it's "a wide variety". This isn't science, it's storytelling.

First, allow me to concede the point that Weasel is not the same thing as evolution as we observe it in the real world. It's just a concise demonstration of how powerful random variation matched with non-random selection can be.

With that said, here's what I do know. Assume a population of 100, and imagine that the lifetime of the universe will only allow 200 generations. Weasel can find a 27-character target string in that lifetime so long as the mutation rate is between 0.5% and 12%. So if one were to randomly choose a mutation rate (from a uniform distribution), one would have an 11.5% chance of picking an acceptable parameter. Those aren't great odds, but they're not terrible, either. 11.5% would not pass muster for ruling out chance in any scientific journal I know of.

Now take the population up to 1,000. You can get convergence within 200 generations for a mutation rate between 0.1% and 20%. That is, you have a 19.9% chance of picking an acceptable parameter at random. Take the population up to 10,000. Now a mutation rate between 0.01% and 28% is sufficient. Those odds are better than 1 in 4. And even with a population of just 50, you can get convergence with mutation rates of 1% to 6%, for odds of one in 20.

So to summarize, with a population between 50 and 10,000, Weasel World would a 5%-28% chance of getting parameters that converge within 200 generations if the mutation rate were selected randomly. As I said before, that's a pretty big bull's eye.

For the record, if this link is to be believed, the bull's eye accounts for about 0.08% of the dart board's surface area.

wrf3 said...

AMW wrote: First, allow me to concede the point that Weasel is not the same thing as evolution as we observe it in the real world. It's just a concise demonstration of how powerful random variation matched with non-random selection can be.

Nothing to concede; we were all agreed on that from the start.

So if one were to randomly choose a mutation rate (from a uniform distribution), one would have an 11.5% chance of picking an acceptable parameter. Those aren't great odds, but they're not terrible, either. 11.5% would not pass muster for ruling out chance in any scientific journal I know of.

Your numbers look right. The problem that I have with the conclusion is that you've picked an arbitrary 200 children/generation and 100 generations. Why not 2 children? Or 15? Or 25 generations? These parameters increase the size of the search space. It seems to me that you're picking the parameters that better make your case instead of looking at all of them. You're tuning your presentation.

AMW said...

Your numbers look right. The problem that I have with the conclusion is that you've picked an arbitrary 200 children/generation and 100 generations. Why not 2 children? Or 15? Or 25 generations? These parameters increase the size of the search space. It seems to me that you're picking the parameters that better make your case instead of looking at all of them. You're tuning your presentation.

Fair enough, I take your point. Let's start with the number of generations. Humans become sexually mature at about 15 or so, and until recent times, tended to reproduce at a pretty young age. Let's be conservative and say the typical human has reproduced by the 20th year of life. Even if the earth were young, as defined by Young Earth Creationists, there would be time for 300 - 500 generations (i.e., 6,000 - 10,000 years). Drosophila fruit flies become sexually mature within a week, so we could have 312,000 - 520,000 generations of them. If we accept the earth as old, the number of generations goes off the charts. Allowing a species to exist for a million years (which I think is supposed to be about the average) you could cram in 50,000 generations of humans, or 52,000,000 generations of fruit flies. I believe both of those figures exceed the upper limits you used in your calculations.

Next, the number of children per generation. 100 per generation is an arbitrary selection on my part, and not all species can bear that many children, though a lot of them can. Certainly 10,000 is pushing it for probably the majority of species. More importantly, in Weasel World, the single most fit phrase gets to reproduce the maximum number of offspring, while nobody else reproduces at all. So beneficial mutations spread instantaneously. But note that shrinking the number of offspring per generation, or lengthening the time it takes for a beneficial mutation to spread only prolongs the process. It doesn't shut it down. With enough generations, we would expect convergence.

Finally, the mutation rate. Low mutation rates simply slow down the procedure; they do not bring it to a halt. So with a long enough span of time Weasel World should converge. High mutation rates can cause a problem if the children per generation is too low, because there is the possibility that all offspring are less fit than the parent. So degradation of the species is a real possibility. But notice that in any world in which this became problematic, we wouldn't be able to observe it, because either 1) "we" wouldn't have evolved to see it or 2) if it happened on another planet, any species there would likely end up going extinct, so there would be no mutation rate to observe.

One might scoff at the notion of different planets with different mutation rates, but it's not so difficult to imagine. We really only know about carbon-based biology with replication based around Adenine, Guanine, Cytosine, and Thymine (or Uracil if we're talking about RNA). But that doesn't mean there aren't other feasible biologies with different chemical bases that would have different rates of mutation. In fact, mutation rates vary from species to species even within the biology with which we are familiar.

Dan said...

Steve, have you seen Cornelius Hunter's recent article mentioning you - http://darwins-god.blogspot.com/2009/09/best-of-worst.html ?

Unknown said...

so much names calling for ID crowd rather than any kind of reasonable debate. Couldn't even finish reading the article. People on both sides after accepting one view closing their eyes to any truth that may exist on another side. So unscientific.