Saturday, July 3, 2010

Analyzing Dawkins' Weasels

weasel n. [Cambridge] A naive user, one who deliberately or accidentally does things that are stupid or ill-advised. Roughly synonymous with loser.

The New Hacker’s Dictionary (Eric S. Raymond)

Richard Dawkins, in his book The Blind Watchmaker (TBW), makes a few bold claims about the “evolutionary power of cumulative selection,” backed up by two of his own computer programs (“Biomorph” and “Weasels”), of which he writes:

“In our computer models […] we deliberately built into the computer the basic ingredients of cumulative selection (emphasis added.)

This statement could lead unsuspecting TBW readers to believe that the output from the two programs really shows how “cumulative natural selection” works, which is not true: Dawkins’ Weasels cheats, as it generates several “mutations” in each “generation,” and protects once matched seed character positions from further “mutations”![1] The above TBW quote should then be evaluated in the light of yet another TBW quote:

“I may not always be right, but I care passionately about what is true and I never say anything that I do not believe to be right.” (emphasis added.)

With no access to the source code for Dr. Dawkins’ version of Weasels, I do not know any details about its inner workings. However, by analyzing its documented output (Table 1, courtesy TBW), a lot can be deduced.

Generation

Evolving Phrase (Within Quotes)

Matches

0 (input)[2]

WDLTMNLT DTJBKWIRZREZLMQCO P

3

1

WDLTMNLT DTJBSWIRZREZLMQCO P

4 (+1)

10

MDLDMNLS ITJISWHRZREZ MECS P

11 (+7(!))

20

MELDINLS IT ISWPRKE Z WECSEL

20 (+9(!))

30

METHINGS IT ISWLIKE B WECSEL

24 (+4)

40

METHINKS IT IS LIKE I WEASEL

27 (+3)

43

METHINKS IT IS LIKE A WEASEL

28 (+1)

Table 1: Dawkins’ Shakespeare phrase “evolving” in 43 generations

Presumably, the program spawns a number of “offspring” from a “parent” seed, then scans these in search of improvements, and if one is found, that particular seed is used to parent the next generation, and so on. Dawkins does not disclose his number of offspring per generation, but judging from his program’s uncanny success—target phrase reached in a mere 43 generations(!)—it has to be a lot more than 10, maybe close to 100.

Table 1 indicates that once a seed position has matched its target position it becomes fixed, no longer “mutating” (in geneticist lingo: the DNA sequence has become highly conserved). No explanation is offered as to why the matching positions should be protected from further tampering. This “immunizing” trick is equivalent to “divine intervention”: using such programming, and claim that it explains cumulative selection, is borderline cheating, at best.

The probability of randomly typing a given 28-character string, using 27 different symbols, in a single-step event is (as Dawkins points out): (27-1)28 = 8×10‑41 = 0.000000000000000000000000000000000000000008. These are slim odds indeed (read: ain’t gonna happen)! What about Dawkins’ flavor of cumulative selection, wherein already matched positions are protected from further tampering? The probability of getting one match is 27-1 (0.037). Table 1 shows that the output from generation 20 had nine matches, in ten generations! This is precariously close to “single step” selection: The probability for this to happen is (27-1)9 = 1.31×10-13 = 0.000000000000131 (about once every 7.6 trillion tries)… a rather strong indication[3] that programmer Dawkins employs yet another creative ploy: more than one “mutation” per offspring per generation. Much more! All of them favorable! Cheat, cheat! Weasel!

To my eyes, Dawkins’ generation 40 (Table 1) looks rather like a Freudian Slip!

I hacked my own version of Dawkins’ “cumulative selection” (“Weasels: The Next Generation”), and made it available for download from my box.net online folders (use URL http://tinyurl.com/Weasels-TNG. My version only spawns one offspring per generation, which is why it needs more generations to reach the desired phrase). The zip archive holds the complete C source, the executable, the “Weasels TNG User’s Guide,” and an Excel “DNA toy.”



[1] Nature does not guarantee that “once mutated DNA bases will never mutate again.” To paraphrase Dawkins: there is nothing to stop a once burgled house from being burgled again in the future (Unweaving the Rainbow, page 110).

[2] There is a typo (a random mutation? The irony!) in my copy of The Blind Watchmaker (1996 reprint paperback edition 2, W.W. Norton & Company, Inc), resulting in the “sequence of 28 letters” only having 27 letters. Analysis of Table 5 data shows that the third letter from the left had been dropped. I randomly selected and inserted a T.

[3] This is about as likely as finding two unrelated people with identical DNA—and DNA evidence is considered trustworthy enough to sentence criminals to severe penal terms.

3 comments:

  1. Thanks for bringing your work to my attention.

    I disagree on most points you are claiming.

    The first and most obvious is your claim that Dawkins' "weasel" program protects already-matched characters. It is ironic that the video I linked to in the post you left a comment on shows that there is no such protection happening, and that is of Dawkins showing off a "weasel" program in 1987.

    http://austringer.net/wp/index.php/2009/03/15/dembski-weasel-and-video-level-evidence/

    Correcting error is good. Let me know when you've removed the "latching" claim from the materials you distribute. William Dembski is going on ten years of perseverance in error on this point (anniversary coming up on Oct. 9th).

    http://austringer.net/wp/index.php/2007/10/09/today-is-a-fine-day-for-a-woollen-kettle-or-a-copper-sweater/

    Wesley

    ReplyDelete
  2. Wesley,

    First, I must stress that I am not in any way advocating "ID: or "Creationism" or "Anti-evolution". All I am saying is that there are a lot of indications that random mutations is maybe not the only source of genomic variation, and that the concept of "cumulative selection" cannot possibly be the main "driving force" behind evolution.

    This is NOT saying that I believe that the "driving force" is some kind of intelligent divine spirit. Only that maybe we have not yet learnt all there is to learn about what pushes evolution in one direction or another.

    Whether you agree with my claims or not is of no consequence, as this does not change anything one way or another.

    The video clip you refer to is not "evidence" of anything, as neither you nor I have any idea of what is actually producing what is shown on the computer screen.

    However, 9 correct characters in their correct places, in "10 generations" (as in my Table 5, which is the same as the table Dawkins published in TBW) is *strong* evidence of *some* kind of cheating.

    My "latching claim" will be removed ONLY when professor Dawkins shows the source of his program, AND if it turns out that no "protection" is in place, AND the object produced by that same source compiled, delivers the same (or something pretty close) to what is published in TBW.

    The curious fact that Dawkins alsways have refused to show his source has been pointed out several times before. I wonder why he doesn't do that, and put an end to this whole "debate"...

    Henry

    ReplyDelete
  3. Hi!

    Source code for 'like a weasel' available here in various languages.

    If you'd like an example of a genetic algorithm that uses breeding and doesn't have a predefined target, here's a keyboard layout generator I'm working on for those with limited use of their hands.

    ReplyDelete