Talk:Weasel program

Latest comment: 3 years ago by 2600:8801:B011:300:A15D:DD06:EA71:2279 in topic Does Dawkins explain why he chose the "Weasel" line from Hamlet as his target phrase?

Untitled edit

Richard Dawkins isn't an etiologist. You should think before you start to write.

H. W. Boger

That was a typo; I copied the link from elsewhere, sorry! And BTW, you might try to be helpful (e.g. by fixing the error) instead of being an ass. MFNickster 18:44, 4 January 2006 (UTC)Reply

Dembski didn't write a cited line edit

Dembski edited 'Mere Creation', but is not the author of the line

For Dawkins, once the computer gets a particular character right, it never allows mutation to work on that character again.

Newman, R.C. (1998) 'Artificial Life & Cellular Automata' in: Dembski, W.; (ed.) 'Mere Creation. Science, Faith & Intelligent Design' Downers Grove, InterVarsity Press S. 427-445 Thomas Waschke (talk) 07:04, 19 September 2011 (UTC)Reply


Dembski's criticism is not relevant. Dawkins addressed these concerns in the book and it is obviously a limited model. It is not valid to criticize a hammer because it can't screw in a screw. — Preceding unsigned comment added by 18.38.2.67 (talk) 16:34, 15 November 2012 (UTC)Reply

Random selection or selection at random ? edit

An extensive discussion was done here https://groups.google.com/group/talk.origins/msg/ba64eda71df143af about how the word "random" can be used to imply intention or non intention. Also see http://scratchpad.wikia.com/wiki/TauTology —Preceding unsigned comment added by 41.15.48.71 (talk) 21:08, 26 July 2009 (UTC)Reply

I added a external link which shows what a sham Dawkin's weasel program is edit

I added a external link which shows what a sham Dawkin's weasel program is. Here it is: Dawkins’ weasel revisited ken 12:08, 11 November 2006 (UTC)kdbuffaloReply

And I moved it to the bottom of the list and identified the link to show what a sham it is. :-) Cheers, Vsmith 13:17, 11 November 2006 (UTC)Reply

I suppose you take Ted Haggard's side, then? You can fool some of the people all of the time. If you simply stopped long enough to read "A Blind Watchmaker," maybe you'd realize how foolish you are. → R Young {yakłtalk} 07:33, 13 November 2006 (UTC)Reply

"Criticism of the Critics" edit

The new Criticism of the Critics section is, in my eyes, misplaced. It doesn't really seem to be about the Weasel Program at all. It refutes criticisms that aren't mentioned in the rest of the article, and the general tone is unencyclopediac. I propose that the section be removed. I will do so in a couple days if there are no objections. Alex Dodge 01:54, 14 November 2006 (UTC)Reply

I would suggest at least mentioning that those who criticize his theories have used fallacies (errors in logic) such as red herring and non sequitirs to attack him. The POV is not balanced as we have criticism of Dawkins yet no criticism of the critics. If you think it's too much, then edit it down to one example.→ R Young {yakłtalk} 03:21, 14 November 2006 (UTC)Reply

Well, I tried to rewrite it, but I realized that I said exactly the same thing as in the previous section. So, I removed the section. Perhaps we can draft a section here and then move it in. In my opinion, the program stands on its own. The only criticism we have of the program in this article (that is has a designed target end point) is discounted in the next paragraph by the statement that this misconstrues the purpose of the program. Alex Dodge 19:33, 14 November 2006 (UTC)Reply

Mr. Dodge, that's not acceptable. First off, we have someone attaching a well-written but fallacious Christian apologist attack. We need to either remove the apologist link, or respond to it in a fair manner. One issue with Wikipedia is to give people information to help them understand things. An apologist attack adds smoke and mirrors. We give them the 'right' to critize the weasel program, yet their own 'arguments' are simply logical fallacies, something that the average reader might not notice. At the very least, the Weasel program is controversial, not because it is wrong, but because some people see it as a threat to their religious beliefs. As such, there is a 'controversy' component. As noted, 'many people' became atheists or left their church after Richard Dawkin's writing. Maybe that's good, maybe that's bad, but it is relevant.→ R Young {yakłtalk} 01:05, 15 November 2006 (UTC)Reply

My apologies. Perhaps you'll reconsider when I've made my points. As I see it, the section as it is addresses several logical fallacies which have been used to try to discredit evolution. The quotes and the responses don't particularly have anything to do with the Weasel program, specifically. I see now the link you're talking about. I don't understand why it's in the article, and I don't see the need to respond to it. I think the link (as well as the other links to similar silliness) could be safely removed, which removes the need for the section.

I had removed the section, as I said, so that it could be revised in the talk page if it was decided that it needed to exist. As it is, it reads more like a defensive rant than an encyclopedia article. I would try to rewrite it myself, but I'm not yet convinced it's a valid section. If it is included, it will need to be written carefully, with a clear goal and a clear argument.Alex Dodge 08:38, 15 November 2006 (UTC)Reply

I would prefer to delete the apologist link as inappropriate. → R Young {yakłtalk} 08:55, 15 November 2006 (UTC)Reply

It is done. Does this agree with you? Alex Dodge 11:07, 15 November 2006 (UTC)Reply

Transcription error? edit

It looks as though the fourth character of the first line of sample output is missing. I could of course replace it with any random letter (except H), but I’m not sure whether the sample is quoted from the book or generated for this page. -Ahruman 01:01, 9 December 2006 (UTC)Reply

There's a comment in that section which says "Note: first generation is 27 characters, but it is verbatim as Dawkins gave it in the book. Perhaps the first or last character is a space." I dug out the book and verified that the examples match Dawkins's text. MFNickster 02:13, 9 December 2006 (UTC)Reply

It's extremely likely that there is a missing T. I've added it, with a note. Evercat (talk) 15:19, 24 September 2009 (UTC)Reply

More Realistic Weasel Program? edit

I was tinkering with the weasel program a bit and had a few insights, which I offer here on the basis that they might provide useful angles to this article. I figured out that it could be made into a more realistic representation of Darwinian evolution by natural selection if, instead of hunting for a given phrase, it used the rules of language to simply come up with any possible phrase that made sense.

This being difficult to do, to say the least, a workable compromise would be to give the program a text file, specify a string of a particular length, and then allow the program to go off on its own and duplicate some unspecified string in the file. This would not be very hard to do and it might be kind of fun ...

... but the really interesting thing is that it would be a waste of time, since from the point of view of the user it is hard to believe that it would take any longer to converge on a solution (in terms of generations, ignoring the greater computing overhead for each generation). In fact, it would probably be faster, since having more strings as possible targets gives more chances for a random letter selection to come up with a match.

All the weasel program was ever supposed to do, as anyone who understands it knows, was show that the "monkeys & typewriters" notion of Darwinian evolution was unrealistic -- a "monkeys" or "saltationist" program would just try to pick strings at random until it got a match, which would take a *very* long time, while the weasel program quickly and relentlessly converges to a solution.

That provides the "light bulb going on in the head" revelation to show a person who's hung up on (but not clinging to) the "monkeys & typewriters" scenario what the real story is: "My weasel takes out your monkey."

Incidentally, there is also the notion -- the "Gish fallacy", after its best-known advocate, Duane Gish -- that since the weasel program (or other evolutionary computer simulations in general) is a program built by a designer, it demonstrates that organisms in the real world must have been made by a designer as well. I realize that nobody with sense fails to laugh at this, it being a confusion of a model with the thing it's modeling, but I offer as a comparison that it's like claiming that since a toy robot panda is built in a factory in China, then a real panda must be made at the same factory -- or like the logic used in cartoons in which a tunnel is painted into the side of a mountain and a train roars out. (By the same logic a computer model of a tornado would demonstrate that tornados were designed.)

One comment: if I am an admirer of Dawkins for his knowledge of evolutionary science, that does not correspondend to *any* endorsement of his views on, uh, other subjects. MrG 4.225.211.216 20:55, 8 June 2007 (UTC)Reply

Dodgy bits edit

In the article, it says:

Dawkins then goes on to show that a process of cumulative selection can take far fewer steps to reach any given target. He refines the program to preserve "favorable" combinations (or "hits") and to allow the remaining letters in the sequence to be replaced. In Dawkins's words:
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, just as before ... 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, METHINKS IT IS LIKE A WEASEL.

Notice that the statement preceding the quote is not supported by the quote itself. What is at issue is whether "weasel" locks in place correct letters as it goes along. Antievolution advocates William Dembski and Robert Marks call that "partitioned search". If one reads "The Blind Watchmaker" carefully, one will see that there is no mention of such a procedure in operation. I corresponded with Richard Dawkins a little over seven years ago to verify that he had never described such a mechanism for "weasel", which he confirmed.

This is simple to fix in the article: strike the second sentence, like so:

Dawkins then goes on to show that a process of cumulative selection can take far fewer steps to reach any given target. He refines the program to preserve "favorable" combinations (or "hits") and to allow the remaining letters in the sequence to be replaced. In Dawkins's words:

And that will do the trick. Unless someone can point to a verifiable source for the assertion that correct characters are retained by a specific mechanism in the program, I will alter this later on, unless someone goes ahead and makes the change. --Wesley R. Elsberry 20:14, 16 October 2007 (UTC)Reply

I've modified the article to bring it into conformation with what Dawkins actually described.

In looking over the remainder, though, I noticed:

"Some philosophers of science have criticized the example as overly simplistic[citation needed],"

Well, the first such citation would be "Richard Dawkins, 1986, The Blind Watchmaker", who discussed a number of points on which "weasel" fails to be a satisfactory emulation of the biological situation. In fact, Dawkins' original discussion is usually far superior to that of various "critics" who followed him. The antievolution crowd in particular seems to have a thing for generating irony as they "introduce" what they claim to be criticisms of "weasel", without apparently having read Dawkins' own self-critique. It should be noted in the article that Dawkins was well aware of the simplistic nature of the program, and that was why he specifically limited his discussion of its utility to the purpose of distinguishing between "single-step evolution" and "cumulative evolution". Again, if there's no substantive disagreement on this point, I will modify the article a bit later on. --Wesley R. Elsberry 14:19, 31 October 2007 (UTC)Reply

Identification of beneficial change in biology?

The program is a vivid demonstration that the preservation of small changes in an evolving string of characters (or genes) can produce meaningful combinations in a relatively short time, as long as there is some mechanism to identify and preserve desirable changes while allowing undesirable changes to be removed or replaced. This is intended to serve as an analogy to natural selection's action on randomly mutating genomes, with the "desirability" (or fitness) of any given change being determined by the organism's interaction with its environment.

The struck-out words correspond to an edit I made on the article, with this comment: "No necessity for identification of beneficial change, therefore removed."

This change was reverted by MFNickster with this comment: "(rv - in the case of the Weasel program, yes, comparing the phrase to a target amounts to identifying such improvements)"

I think it should be clear that the stated reason for the revert is unjustified. 1. The section in question is not specifically about "weasel"; it is about biology as well, and there is no "identification" of beneficial parts. 2. Even in "weasel", there is no "identification" of the part that conferred benefit. The string match does not cause particular desirable changes of the "genome" to be preserved, contra the article's statement. This constitutes an error in the article, and should be removed expeditiously. --Wesley R. Elsberry (talk) 05:10, 27 November 2007 (UTC)Reply

Hi, I take your point, but unfortunately, without having Dawkins's code or something like it, it's impossible to tell how the comparison was done. However, Dawkins did state that the selection pressure was toward the phrase which "most resembled - however slightly - the target phrase." From this, I think we can infer that a comparison is done which would identify matching characters as "increased fitness" and non-matching characters as "decreased fitness." In this context, "desirable" would have to mean matching characters, would it not? MFNickster (talk) 06:11, 27 November 2007 (UTC)Reply
Addition: You are correct that the phrase does not refer solely to the program, although when I wrote the sentence I failed to notice the confusion of the two. Maybe we can find a phrasing which is technically correct, but gets the point across that the mechanism is one which selects for fitness (or "desirability") in the organism's environment. MFNickster (talk) 06:19, 27 November 2007 (UTC)Reply
Getting rid of "identify and" is technically correct phrasing.
It seems to me that "identify" is WP:OR. It certainly doesn't ring a bell as to being part of what Dawkins described in "The Blind Watchmaker" as any necessary part of the underlying biology, nor do I recall him using the term in describing "weasel". It doesn't matter that we don't have Dawkins' code; unless you can provide WP:RS for the wording involving "identify", removing it is the right thing to do. --Wesley R. Elsberry (talk) 13:40, 27 November 2007 (UTC)Reply

Okay, I have made another edit which I believe is closer to what I was trying to describe. In re-reading the passage in the book, I noted that Dawkins was careful to avoid such loaded words as "desirable," "beneficial," "improved," etc. Let me know what you think. MFNickster (talk) 16:38, 27 November 2007 (UTC)Reply

The new edit is (1) less clear than the edit I proposed for the old text and (2) incorporates an additional quote from Dawkins which is, unless I am utterly mistaken in my recall, addressing a different program, his "biomorphs" example.
Something that I feel is missing here is an appreciation for a critical aspect of Dawkins's argument: evaluation of the fitness of whole phenotypes can cause the preservation and differential propagation of individual genes. Not appreciating this was expressed earlier in the article falsely claiming that individual changes were locked in and not subject to mutation as "weasel" found new matches at the character level. This problem carried over into the section now at issue with that "identify desirable changes" phrasing. In the current edit, one can still see its influence in "select cumulative changes". This is problematic in that "cumulative change" is not distinguishable from simple "change". I think the current edit does not adequately distinguish an outcome, the general and usual preservation of cumulative change, with a mechanism to accomplish that. --Wesley R. Elsberry (talk) 16:10, 28 November 2007 (UTC)Reply
Yes, the additional quote refers to the biomorph example, but its point applies to 'Weasel' as well. They are both examples of artificial selection. I found it clearer to keep the context on 'Weasel' rather than add additional description to compare 'Weasel' and the biomorphs. The only real difference is that in 'Weasel' the selection is determined once at the beginning rather than incrementally each generation. It probably should be placed in proper context, though, or be removed.
I think my recent edit is clearer than the previous version, because more specific about the circumstances that apply in each case, but on re-examining the chapter in question I think we can re-write the section to follow from Dawkins's text without relying on too much interpretation. The main points I'm trying to get across here are:
  • The example doesn't have implications for biology beyond the demonstration of cumulative vs. random "single-step" selection - Dawkins intended it only to refute the argument that organic molecules are too complex to have arisen by chance.
  • The program does rely on a human-chosen 'target', but this is irrelevant - the point is that cumulative selection works whether the selection process is natural or artificial.
  • The selection being done in 'Weasel' is not a demonstration of selection by phenotype. The biomorph program is a better model of that process, because the user never sees the 'genes' that grow the biomorh. In 'Weasel' the programmer selects a target genome, not a phenotype.
Regarding your other points, my misunderstanding of how 'Weasel' works is due to my memory of an example on another site which gave an interactive demonstration of a Weasel-type program - unfortunately, the author did exactly what I described, "locking in" each change that matched the target, and I had forgotten that Dawkins never said that this was what his own program did. I regret not verifying that.
Cumulative change would be indistinguishable from random change if the mutation rate were high enough - each child string would no longer resemble its parent much if at all, which would effectively scramble the string each generation and the selection process would fail to reach the target. I don't believe Dawkins mentions this in the text, though. MFNickster 15:43, 30 November 2007 (UTC)Reply
No, I don't recall Dawkins mentioning high mutation rates in his text. The most likely reason being that very high mutation rates are rather unlike the biology. I did write to the authors of a website featuring an erroneous "weasel" program recently, telling them:
If the mutation rate is increased, the search takes an increasing number of tries, until in the limit of constant replacement at every position the algorithm is indistinguishable from blind search. The "partitioned search" method, though, is relatively insensitive to mutation rate change, and will converge even with a 100% mutation rate.
Basing the description more closely upon the original text sounds like a good idea.
Leaving the quote about biomorphs in the "weasel" article without an explicit statement that Dawkins is talking about a different program is a bad idea. My $0.02. --Wesley R. Elsberry (talk) 04:24, 13 December 2007 (UTC)Reply

Recent events edit

A portion of a 1987 BBC program on Dawkins and his book, "The Blind Watchmaker", is now available on YouTube. If you go to about 6:15 in that video, you will see display of Dawkins' "weasel" program in operation. It shows that there was no "locking" of correct characters. That should put paid to any lingering doubts that Dawkins accurately described his program in "The Blind Watchmaker". Also of interest is the antievolutionist reaction, where William Dembski speculates that Dawkins must have used a different program rather than admit that the simplest explanation is that he has persisted in being wrong on the point for over eight years. The relevant probabilities for "weasel" are laid out here. --Wesley R. Elsberry (talk) 03:02, 19 March 2009 (UTC)Reply

Dembski is assuming that the "runs" Dawkins transcribes in the book are a verbatim record of every string ever printed on the screen while the program is running. It's quite possible that the program itself flashes every generated mutation to the screen (including "bad" mutations which aren't kept to the next generation; the quoted description describes the program "examining the mutant nonsense phrases" before choosing the closest match), while the book just chooses to list the "winning" strings from each generation. --McGeddon (talk) 09:50, 19 March 2009 (UTC)Reply
I don't have TBW with me, but I don't recall any statement to the effect that the reader is being treated to any transcript of on-screen displays. Dembski is choosing to stick to his incorrect description, and is forced to take increasingly uncharitable stances toward Dawkins because the evidence keeps piling up that Dembski has just been flat-out wrong on this. --Wesley R. Elsberry (talk) 04:01, 20 March 2009 (UTC)Reply
I do have a copy of TBW (the 1996 Edition) in front of me and he uses the word "reporting" and always says that he is showing every 10th generation. "Reporting" indicates to me that it is not a transcript. Of course, it doesn't really matter because as you and everyone else with a passing interest and some competence in programming has shown, a program without locking can easily generate results consistent with those reported in TBW. My informal experimentation has shown similar convergence times for a non-locking version with a population size from 200-250 and a mutation rate of about 2%.Craig Pennington (talk) 12:45, 30 March 2009 (UTC)Reply

The Algorithm edit

I'm trying to reproduce the Weasel program, or something like it, and it seems I've been guilty of the same misunderstanding attributed to Dembski and "creationists": I lock individual letters once they reach the correct state. The fact that this is an error only became clear to me after reading this discussion page. The main page doesn't actually describe the Weasel algorithm in enough detail to reproduce it. Is that because the algorithm was never documented? If the algorithm was never documented, then I think that should be made explicit on the main page. It would be even better if the popular misunderstanding of the algorithm was also spelled out in full, rather than vaguely accusing certain parties of deliberate misinterpretation. As far as I'm concerned, it's an understandable mistake, and it's only fair to point out the deficiency of Dawkins' documentation as contributing to that error (if there is no documentation). --203.213.41.125 (talk) 19:33, 22 April 2009 (UTC) Addendum: it seems that the Monash University demo applet promotes the same misunderstanding!Reply

Why is it 'an error' to 'lock individual letters once they reach the correct state'...? Pfistermeister (talk) 21:04, 22 April 2009 (UTC)Reply
If Dawkins's original program did not do this, any attempt to replicate the program with locking or evaluate the behavior of the original program will be off the mark. MFNickster (talk) 21:49, 22 April 2009 (UTC)Reply
Dawkins' original program *did* do this. When it got a letter 'right', that letter *stayed*. Otherwise, the program wouldn't have got anywhere; and it wouldn't have beeen 'cumulative selection', would it? Pfistermeister (talk) 22:14, 22 April 2009 (UTC)Reply
No, that's what the discussion was about. According to Dawkins's description, the program "chooses the [progeny phrase] which, however slightly, most resembles the target phrase" - which allows for 'correct' letters to change as long as the new phrase is closer to the target. MFNickster (talk) 22:23, 22 April 2009 (UTC)Reply
His examples never show a phrase in which a 'right' letter is replaced by a wrong one. Your whole argument sounds like a creationist attempt to muddy the water by nit-picking criticism. Pfistermeister (talk) 23:19, 22 April 2009 (UTC)Reply
Uh, what? Creationists have nothing to do with it, except that perhaps some of them have also made the assumption that 'correct' letters are locked in place. The point is, such an assumption is not supported by Dawkins's description. Oh, also notice that the sample published in The Blind Watchmaker is missing 36 generations in which 'correct' letters could have changed - and that the 19th character in the sample run goes from 'E' to 'R' and then back to 'E'. MFNickster (talk) 23:29, 22 April 2009 (UTC)Reply
I have recreated the Weasel program directly from the text of The Blind Watchmaker here. There is no reasonable reading of what Dawkins wrote that suggests that correct letters do not change once found. In fact, Dawkins uses the term "random mutation" to describe the changes to progeny.Patrick J. May (talk) 01:03, 23 April 2009 (UTC)Reply

Thanks Patrick J. May – excellent! Like 203.213.41.125, I have wondered about the algorithm since encountering this article (I read the book many years ago), and a few minutes spent in the external links of the article didn't satisfy me – but now I'm happy.

I have done a few runs of Patrick's program and have found that it is easy to jump to the false conclusion that correct letters are "locked" – I had to play around with the numbers and do several trials to find a case where a letter became correct, then later changed to wrong, then finally became correct again. The parameters given to the program determine whether it is likely that a letter will change to good, then bad, then good (and the numbers I initially used made that unlikely).

I believe the reason for this "apparently locked" behavior is quite simple (now I've spent an hour studying it!), if we understand the algorithm. Suppose the parameters "100 0.05" are given to Patrick's program. Each generation consists of a single sentence. From that parent, 100 progeny are created, each with (on average) 5% of the letters mutated. Then, the first child with the largest number of letters matching the target is chosen. That child becomes the parent for the next generation.

Suppose a parent sentence has 10 correct letters. In its 100 progeny, some may have fewer correct letters (because some good letters changed to bad), but it's likely that there will be plenty of cases where no good letters were changed; most of those cases, will have 10 good letters, but some may have 11, or even 12 or more. It is unlikely (with a small mutation rate) that the best child will have had some good letters go bad, because that child would also need to have had a larger number of bad letters go good. It is more likely that the best child will come from one of the progeny where the good letters did not change, but where one of the bad letters happened to become good. This argument by hand waving should be made more rigorous, but it's adequate to satisfy me.

Of course, none of this original research should appear in the article, but I think it might be useful to have a subpage (a FAQ) with a summary. I'd like to see an implementation in Python in such a FAQ, but I probably won't get around to it myself.

Patrick: Your code is not quite standard C. In main(), variables phrase and progeny are declared, but then they are declared again. The "char *" and "char **" should be omitted from the second occurrence. Thanks again. Johnuniq (talk) 08:32, 23 April 2009 (UTC)Reply

"Not quite standard C." How delicately put! You found a bug, thank you. Fortunately it has no effect on the behavior of the program. I've fixed the code on the site.Patrick J. May (talk) 11:06, 23 April 2009 (UTC)Reply

I have set out various probabilities related to the performance of "weasel" in this thread and am working up a set of posts on my weblog, part 1 and part 2 are up so far. I think that I will be able to cover the perennial issue of "why didn't any of Dawkins' letters change back" in Part 3, and the final part, whatever number that turns out to be, will take up the long-term miscomprehension and worse religious antievolutionists have had for evolutionary computation and especially "weasel". Part 2, by the way, has a minimalist implementation in Python, and I have a Javascript version here. One antievolutionist refused to take the video evidence that there was no "latching" of correct letters in "weasel", and I eventually set up a bunch of "weasel" runs that empirically collected the information on the proportion of runs where one would observe the loss of a correct letter in the sort of summary output Dawkins used in "The Blind Watchmaker", see here for the graph showing mutation rates from 0 to 0.1 and population sizes from 5 to 100,000, with each data point derived as the proportion seen in 100 runs at those particular parameters. I obviously cannot change the content of the article based on this as WP:OR, but it should nonetheless go some way to showing people why pointing to the 1986 summary outputs does not give any sort of weight to the assertion that "latching" had to be used. --Wesley R. Elsberry (talk) 20:26, 24 April 2009 (UTC)Reply

Wow – I see this is a well-trodden path. Thanks for taking the trouble with all those details and graphs. I was genuinely puzzled why the program appears to lock correct letters until some thought led me to the (in retrospect) obvious explanation that I expressed above. I know that you nailed the point, but despite being mathematically competent, I find the simple descriptive explanation more satisfying. If you wanted to make a section devoted to the "locking" issue, you might consider wording along the lines of what I wrote above.
Finding this topic seems to be fatal for a programmer; I have now implemented my own Python program. When checking for locked letters, it's useful to make the target "AAAAA" (I used fifty As). Then I viewed the list of generations in an editor where I could highlight each "A" in a different color; that makes it easier to notice where good letters have gone bad. Johnuniq (talk) 04:02, 25 April 2009 (UTC)Reply

There is a link in the references section to a Creation Ministries site that restates the proven false claim about Dawkins' algorithm: "Once a letter falls into place, Dawkin's program ensures it won't mutate away." This link should either be removed or a section on the (silly) controversy over the algorithm should be added. I'm happy to write a first draft of such a section, referencing Dr. Elsberry's work among others, if the others editing this page agree it makes sense.Patrick J. May (talk) 16:44, 25 April 2009 (UTC)Reply

I've restored this comment but refuted it with an image of a full run. Evercat (talk) 16:44, 24 September 2009 (UTC)Reply

f.w.i.w. here's a javascript version.

m='METHINKS IT IS LIKE A WEASEL'; a='AZQWSXCDERFVBGTYHNMJUIKLO P'; al=a.length; gen=0; ml=m.length; s1=s2=''; 

for(i=0;i<ml;i++){ 	s1+=a.charAt(Math.floor(al*Math.random())); 
			s2+=a.charAt(Math.floor(al*Math.random())) } // make 2 random strings to start off

function weasel(){ c1=c2=0; 
	for(i=0;i<ml;i++){ 	if(s1.charAt(i)==m.charAt(i)){ c1++ } 
				if(s2.charAt(i)==m.charAt(i)){ c2++ } } //compare both with target
	keep=(c1>c2)?s1:s2; chuck=(c1<=c2)?s1:s2; gen++ 		// which is closer?
	mutate(keep)
	document.getElementsByTagName('div')[0].innerHTML=keep+' '+chuck+' '+gen
	t=setTimeout("weasel()",1)
	if(keep==m){ clearTimeout(t) }
	s1=keep
}

function mutate(str){ 
	x=Math.floor(ml*Math.random()); 				// pick any letter to mutate
	arr=str.split(''); arr[x]=a.charAt(Math.floor(al*Math.random())); 
	s2=''; for(i in arr){ s2+=arr[i] } 
	//x=Math.floor(ml*Math.random()); arr=s2.split(''); arr[x]=a.charAt(Math.floor(al*Math.random())); //does a 2nd mutation
	//s2=''; for(i in arr){ s2+=arr[i] } 
}
window.onload=weasel  

— Preceding unsigned comment added by 94.197.171.18 (talk) 22:14, 12 December 2011 (UTC)Reply

Improving article edit

I've started what I hope are some improvements, and encourage Patrick to pursue his comment from the end of the last section. I felt a little unclean making this edit, and am happy with MFNickster's prompt reversion, although it is unfortunate that the text is clearly incorrect. The typo in the original book is trivial, but it may confuse a reader who was trying to make sense of the results because it's unlikely that generation 2 would arise from generation 1. If a reliable source could be found, it might be worth addressing the typo in the article. Also, while the article must remain encyclopedic, in view of the "locked letters" controversy, it seems fair to include a section on that topic. Johnuniq (talk) 05:20, 26 April 2009 (UTC)Reply

I agree, that's a logical conclusion regarding the change from generation 1 to 2. If I recall, there was some mention early on about the first string being one character too short, and the obvious place for it is where you inserted the space. Nevertheless, I think it's best to stick with the text unless we find another source to clarify it. The book does not show 2 spaces between the first and second 'words', so we should probably keep it consistent. MFNickster (talk) 06:26, 26 April 2009 (UTC)Reply

It's clear that a T was missing at character 4 on line 1. This is by far and away the most parsimonious explanation. Evercat (talk) 18:05, 24 September 2009 (UTC)Reply

'Weasel algorithm' section edit

Is there a source for this section? The Blind Watchmaker doesn't include such a detailed description. If it's original research, it should go. MFNickster (talk) 15:24, 29 November 2009 (UTC)Reply

Bah. It's clear enough that this is the actual algorithm. The only uncertainty is what values (offspring per generation, and mutation rate) Dawkins used. But here's how the algorithm as I gave it maps onto Dawkins' description:

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 [my step 1], just as before ... it duplicates it repeatedly, but with a certain chance of random error – 'mutation' – in the copying [my step 2]. The computer examines the mutant nonsense phrases [my step 3], the 'progeny' of the original phrase, and chooses the one which, however slightly, most resembles the target phrase, METHINKS IT IS LIKE A WEASEL [my step 5].

Step 4 is implied. Evercat (talk) 18:20, 29 November 2009 (UTC)Reply

My concern is that if it's limited to what Dawkins described, we can't assume any variables he used. To include that information uncited is original research and leaves the section vague as to whether this is Dawkins's Weasel algorithm, or just "an example Weasel algorithm." Also, if it's already implied by Dawkins's description, it's redundant to the article. MFNickster (talk) 23:21, 29 November 2009 (UTC)Reply

It's an example Weasel algorithm. You can use whatever numbers you like. It's not entirely redundant since it's much clearer this way. Evercat (talk) 23:26, 29 November 2009 (UTC)Reply

I do not know the policy basis, but I have observed a lot of mathematical articles where unsourced proofs are given. I find those proofs, with their brief comments, to be particularly helpful. In the same way, the algorithm section here is about the only clear statement in the article that helps the reader understand what it's all about. I believe that the argument is that the mathematical proofs (and the algorithm section here) are obviously true and so don't require a source, although I confess to feeling uncomfortable after putting it so plainly. There are many implementations of the weasel program, and a tremendous amount of non-Dawkins discussion, so I think it is reasonable that the article contain a small amount of non-Dawkins material (that is, we are not limited by exactly what Dawkins has written on the matter). Johnuniq (talk) 03:39, 30 November 2009 (UTC)Reply
Just noticed this specific example: Allele frequency (and there are plenty more very helpful articles like that) has a bunch of original research, yet, for those who understand it, the information is a simple statement of fact. Johnuniq (talk) 03:53, 30 November 2009 (UTC)Reply

Giving examples that are based on what's known in the literature isn't original research. But as I've said, in this case it's just a more formal, more computer-programmer oriented version of what he says. Evercat (talk) 10:39, 30 November 2009 (UTC)Reply

Biomorphs edit

'Weasel program' is not the 'biomorphs' program (which was a 3x3 graphical fractal-based 'creature' program). Both programs were written by Dawkins and discussed in the same book 'The Blind Watchmaker', but I don't think its correct for 'biomorphs' to redirect here ? 217.34.183.65 (talk) 14:53, 15 January 2010 (UTC)Reply

The biomorph page is a disambiguation page now, I don't think it needs to redirect here. MFNickster (talk) 18:20, 15 January 2010 (UTC)Reply

Dawkins weasel edit

Why the change to the lead where "The weasel program is..." became "Dawkins' weasel, the Dawkins weasel, or the weasel program is..."? (btw the nowiki stuff is not necessary.) If some people refer to it as "Dawkins weasel" that can be mentioned in a by-the-way fashion somewhere, but is there (excluding creationist's websites) reason to think that the alternate names are required in the opening sentence? If the current lead is kept, the article needs to be renamed (please don't). I favor the original wording. Johnuniq (talk) 02:55, 27 March 2010 (UTC)Reply

Lock, no lock, it's indifferent edit

This discussion is somewhat amusing in that it betrays the ignorance of both parties, and the ignorance is amusing in that both parties are quite self-conscious of their intellectual superiority.

(These programs have precious little to do with biology, and many here at least understand that, unless one were to posit that evolution had targets.)

- First, it's the author's fault that he didn't give a low-level specification of what the program does, so he shouldn't really complain about other people's assumptions.

- Second, in high level terms, what it does is: 1. Generate a random sequence, 2. Compare it to the target, 3. Pick the sequence that most resembles the target, 4. Modify it in a random way, 5. Return to (2). Now, the relevant step is step (3). It doesn't matter one iota whether (4) is allowed to introduce changes to parts of the seuqnece that already matched the target; step (3) will assure quick convergence as long as the changes in (4) aren't brutal, because, if you stop to think for a moment, what it does is pick a sequence that is closer to the target than the one before it - again, provided the changes in (4) aren't brutal. It doesn't matter whether position IX is allowed to change once it matches the target, because what's being evaluated is the whole's resemblance - so, even if IX changes, the fcat that the sequence is selected means that XII and VIII turned from wrong to right.

This program doesn't do anyhting at all that sheds any light on anything other than he program itself . any computer scientist will tell you that. Using it as an 'argument' in a discussion of anythign but itself is fallacious. 2.80.222.59 (talk) 17:10, 2 April 2011 (UTC)Reply

That's great, but doesn't really help us improve the article. That's what these discussion pages are really for. Do you have any suggestions? MFNickster (talk) 20:34, 2 April 2011 (UTC)Reply
The "no lock" argument is crucial in drawing analogies between the weasel program and the biological mutation process - as was demonstrated by both proponents and opponents of Dawkins' book. The program is just an illustration, not an argument. The argument itself (that the cumulative selection works much faster than one step selection) should be obvious to anyone with basic math knowledge, not necessarily a computer scientist. Roponor (talk) 20:13, 20 May 2011 (UTC)Reply

26 letters? 28 letters? edit

This article is inconsistent with regard to the number of letters said to be on the hypothetical keyboard. 86.135.115.218 (talk) 15:21, 15 April 2012 (UTC)Reply

Where exactly? There are 27 characters (all letters + space) on the keyboard, and they generate a string that is 28 characters long. Evercat (talk) 23:53, 15 April 2012 (UTC)Reply
You're right. I misread part of it. 86.135.115.218 (talk) 22:42, 18 April 2012 (UTC)Reply

Irony edit

Its funny how anti-creationist experiment says it would take more than lifetime of universe to get 28 character-long variation right from set of 26 characters when trying randomly. Yet forgets to explain how self-evolving, self-replicating cell can somehow come to existence at random. Nobody else found this hillarious ? — Preceding unsigned comment added by Mentospech (talkcontribs) 10:29, 13 September 2013 (UTC)Reply

Please read the whole article. If you have any specific suggestions for improving it, post them here. MFNickster (talk) 01:03, 14 September 2013 (UTC)Reply
The article doesn't forget anything. The weasel program is not meant to explain abiogenesis, only compare cumulative selection to random selection. Where cells came from is not mentioned because it is not relevant to this specific argument. To answer your question, though, life, as you rightly assume, did not begin as a complete single-cell organism. The cell itself evolved as a result of natural selection from a process that began with a much simpler self-replicating molecule. Perhaps you think such a molecule appearing is itself vastly improbable. Perhaps you're right. But consider there are at least 100 billion stars in the galaxy, and at least 170 galaxies. If we assume that the other galaxies are, on average, like ours, then that's 1022 stars in the universe, any one of which might support life. Thus, if there is, say, a one in quadrillion chance that any given star may eventually give rise to life by pure chance, then that it should happen somewhere, sometime, is a statistical certainty. See Law of large numbers. - furrykef (Talk at me) 23:12, 8 November 2013 (UTC)Reply
This is what Dawkins is talking about when he refers to the Argument from Personal Incredulity. You can do all the probability calculations you want, but it doesn't disprove anything. Unless you can show your calculations accurately model abiogenesis - which would be difficult since the process is purely hypothetical at this point and hasn't been modeled in detail from start to finish. What science has shown is that certain steps in the development of life (e.g. random formation of amino acids) are possible through random processes, and such steps are necessary but not sufficient for the formation of life. Whether one finds this incredible or not has nothing to do with what actually occurred. MFNickster (talk) 15:06, 9 November 2013 (UTC)Reply

Analytical solution of the Weasel algorithm edit

I am wondering if there is an analytical solution to the Weasel algorithm. I think of a probability distribution of the number of trials necessary to achieve a target sequence, the mean and variance implying the following parameters:

  • length of the alphabet
  • length of the target sequence
  • mutation rate
  • population size

Have you seen a site where this is done? On evoinfo.org Dembski proposes a solution for what he calls "partitioned search". But I am looking for a solution of what he names "proximity reward search", which apparently is the real Weasel algorithm. I am not interested in a numerical but analytical solution of the mean and variance as functions of the above-mentioned parameters. EternalAsker (talk) 18:56, 10 February 2017 (UTC)Reply

Link removed edit

I added the link An analytical solution to Dawkins' algorithm applied to the split between the Homo and Pan genera in the external section, because it answers my question from above. Now, someone removed it, arguing that this article "is from an expert in technology, not biology trying to disprove macro-evolution by applying the Weasel program the wrong way (admittedly)".

Is that your argument? Since he is not a biologist, his arguments are false? Or can you tell us specifically in what particular "wrong way" the algorithm is applied? Or are you simply hysteric about any criticism concerning natural selection? Like Muslims who do not admit any criticism about their religion? Who close their eyes about whatever could undermine their believes? EternalAsker (talk) 10:09, 16 January 2018 (UTC)Reply

I can find no evidence that that article has been peer reviewed or that the author has any qualification relevant to the subject. He himself implies he does not here: https://www.goodreads.com/author/show/5297841.Ulrich_Utiger
The author appears to have only a cursory understanding of genetics and less of evolutionary theory. The mathematics in the article, extensive though it is, seems to be their to obfuscate rather than elucidate. Most of it has little relevance to the conclusions he draws (or to biological evolution, or to Dawkins' weasel program).
Specifically:
"One may argue that evolution is an optimization process towards a unique target that is optimally adapted to the special conditions prevailing on this planet."
Not if one has even a basic understanding of biomes, ecology or evolutionary niches. There is no unique target and no optimal solution for survival in complex biological environments (only a vast range of good ones) - and no evolutionary biologist has, to my knowledge, ever made that claim (including Dawkins).
"Why do we not have more than two eyes, arms and legs like spiders or echo sounders like bats or other very useful survival capacities that abound in other species?"
The author here fails to realize that every adaption to the benefit of an organism also has a cost. We might as well ask "why don't all cars fly?" Answer: basic economics. This is getting close to 'croc-a-duck' silliness.
"The Weasel distribution starts with parents that have an unrealistic high initial genetic variation."
Whether the weasel program (or a variety of similar programs, called genetic algorithms) starts with a random population, a population of identical strings which are mutated, or (equivalently) a single string which is copied then mutated, it will still rapidly converge to the same (target) string in a weasel program scenario. It is a matter of a small number of generations (maybe hundreds or thousands, depending of the details) difference. This would be obvious to anyone with even a basic understanding of probability *and* how the weasel program (more generally, genetic algorithms) work.
"The Weasel-algorithm is based on a single lineage: the best kid (male or female) tacitly chooses a partner among a virtual population and only his or her genetic information is transmitted to the next generation. So there is no recombination and its utility compared to a more realistic situation of an entire population ..."
This is true as far as it goes (and as far is I am able to understand what is being said). But the implication here seems to be that, if it did, it would be less able to find the target solution. In fact, in complex genetic algorithms - actually used to solve real-world problems in computer science - genetic recombination is essential. Notably, in the weasel program - even given the vast improbability of hitting the target by random trials - mutation and selection *alone* is sufficient to rapidly reach the target.
"Genes are only functional if they are complete. A partial achievement of a target sequence is not functional and thereby does not procure an advantage for survival."
This is just the 'irreducible complexity' nonsense cast in the language of genetics.
"The Weasel algorithm does not implement population size, which makes it a lower limit for more complex algorithms that implement such properties, since population size exponentially increases the expected number of generations."
This seems to be suggesting that a larger population size makes it *less* likely that the right (or, in other, non-weasel scenarios, a good) solution will be found. This is both demonstrably untrue in the biological world (consider the rate of evolutionary change in influenza vs, say, elephants). It is also known to be untrue in the practical application of generic algorithms to real world problems. (Being generous, the wording used in this specific statement is sufficiently vague - given that 'lower limit', 'more complex' and 'properties' are not clearly defined here - that I might be misunderstanding the intent.)
"It is an illusion to think that the only task evolution had to achieve is generating DNA code" ... "Nevertheless, a system capable of executing such an order must almost be infinitely more complex and thereby have a much lower probability to be built by chance."
This is flawed in several ways. First, the *only* component of a biological system that evolution can select on is the genetic material, for the simple and very obvious reason that this is the *only* component that is inherited from generation to generation *and* is amenable to variation in so doing. The biological mechanisms that express genes are, of course, encoded in the genome themselves. Second, "almost infinitely more complex" is a rather pathetic statement given the extensive claim to mathematical rigor in the body of the text. Third, no serious biologist would claim the biological mechanisms that, in modern organisms, express genes into proteins were 'built by chance'. They too would have to have evolved from simpler systems of heredity. (Several hypotheses have been suggested and this is an open area of research.)

In short, long on maths, short on understanding of the subject matter.86.186.134.244 (talk) 23:52, 7 March 2018 (UTC)Reply

Its "long on maths". I conclude from this that you did not understand a clue of the maths, which is why I don't even take the time to comment on the rest what you are writing. Why don't you reveal your identity? I bet you are Wesley R. Elsberry...EternalAsker (talk) 12:33, 15 March 2018 (UTC)Reply

This makes no sense whatsoever edit

The program defines an end target (the quote from Hamlet) and assigns a score the randomized string based on how similar to the target it is. Then the program keeps the desired part.

"Compare each new string with the target string "METHINKS IT IS LIKE A WEASEL", and give each a score (the number of letters in the string that are correct and in the correct position). If any of the new strings has a perfect score (28), halt. Otherwise, take the highest scoring string, and go to step 2."

And this was brought up as further evidence for evolution? It searches for predefined data! It actively selects pre-defined data, and stops mutation once parts of the pattern are found. Nothing about is truly random. it actually sounds like theistic evolution, i.e. evolution started by an intelligence, with an already defined goal.

How is that Darwinian? Darwinian evolution has no pre-defined "goal", and it doesn't select according to the parameters of that goal. — Preceding unsigned comment added by 91.64.215.242 (talk) 01:13, 18 June 2018 (UTC)Reply

You should read the article, specifically the "Implications for Biology" section. Dawkins says the same thing, and explains why that's not the point. MFNickster (talk) 05:29, 18 June 2018 (UTC)Reply
Or if the article is too much, read "random variation combined with non-random cumulative selection is different from pure chance" in the introduction. Johnuniq (talk) 05:35, 18 June 2018 (UTC)Reply

Treanco's addition edit

Treanco I see a few potential problems with the new material. The tone may need some work (i.e. in an encyclopedia we don't directly address the person as "you" (second person)). It also appears to be original research (WP:OR) when Wikipedia articles should only summarize reliable sources (WP:RS). There does appear to be a suggested book, if that is the reference it remains unclear what sentences summarize from the book exactly (i.e. usually after a sentence or two there would be a source including the page number). Lastly, this book appears to be self published? I also see a relation between your nickname and a web page advertizing the book, suggesting a possible conflict of interest (WP:COI). Because of all those issues I'm reverting the changes for now. Thanks, —PaleoNeonate – 10:45, 10 July 2018 (UTC)Reply

The text was not suitable; thanks for removing it. Apart from anything else, the article is about a particular idea by Dawkins and his algorithm convincingly shows his point, namely that random changes can lead to a useful outcome if directed by natural or unnatural selection. Commentary that is not directed at the simple weasel program is not useful here. Johnuniq (talk) 10:54, 10 July 2018 (UTC)Reply

Does Dawkins explain why he chose the "Weasel" line from Hamlet as his target phrase? edit

The passage from Hamlet (scene three, act two) is as follows:

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.

Polonius: It is backed like a weasel.

Hamlet: Or like a whale?

Polonius: Very like a whale.

I got a laugh when I consulted Hamlet to get the full context. It reminded me of Darwin's fantasy about a black bear evolving into a whale (or some enormous aquatic creature with the mouth the size of a whale).

"In North America the black bear was seen by Hearne swimming for hours with widely open mouth, thus catching, like a whale, insects in the water. Even in so extreme a case as this, if the supply of insects were constant, and if better adapted competitors did not already exist in the country, I can see no difficulty in a race of bears being rendered, by natural selection, more and more aquatic in their structure and habits, with larger and larger mouths, till a creature was produced as monstrous as a whale" (On the Origin of Species, 1859 edition, Chapter VI).

If anyone knows the reason Dawkins chose that line from Hamlet it would make an interesting addition to the article.

2600:8801:B011:300:A15D:DD06:EA71:2279 (talk) 00:37, 11 February 2021 (UTC) James.Reply