Dawkins weasel

In his 1986 book The Blind Watchmaker,Richard Dawkins: The Blind Watchmaker, 1986, pp. 46-47 Richard Dawkins presents an algorithm which became known as the Dawkins Weasel.
==The weasel==
==In action==
Thanks to the marvels of the modern Internet, you can see the weasel for yourself.If you want the Dawkins weasel in other computer languages, see the "like a weasel" blog, which has versions in Python, Perl, Excel VBA, etc. Click the start button to see the phrase "evolve" before your very eyes!
METHINKS IT IS LIKE A WEASEL
By repeating the process you can begin to get a picture of how evolution can work. Sometimes it happens fast, sometimes slowly. Sometimes it gets a word pretty quick while the rest of the phrase lingers around looking like gibberish. Other times it gets stuck in gibberish land until one tiny kick lets it evolve quickly. Of course, evolution isn't always directional like this, the Weasel program certainly has an aim; to reproduce the exact phrase put into it from randomness and variation. However, natural selection does favour certain aspects or abilities or traits over others and the Weasel program certainly does simulate this. In the case of the algorithm, it generates an "environment" that favours strings of words that look like ME THINKS IT IS LIKE A WEASEL, just like a green environment would favour green insects as they would camouflage themselves against predators. Thus, when the algorithm runs, it uses random mutation, followed by natural selection, to derive something that is optimal for the environment it's in.
==Implementation==
The algorithm has been implemented in various programming languages by numerous programmers. Most implementations are quite similar, along the following lines:
#choose random string
#copy string n times with mutation
#take best fitting string
#Stop, if the number of correct letters is 28, otherwise
#goto 2
Step 3 includes the evaluation of a fitness function. Virtually all implementations define the best fitting string as the one with the most correct letters - a number between 0 and 28.
William Dembski, being a noted intelligent design advocate, chooses another way:
#choose random string
#if all letters are in place: STOP Otherwise:
#mutate letters which are not in place
#goto 2
Surprisingly, Dembski insists that this is the implementation Richard Dawkins used in his book - though Dawkins himself says otherwise. Answers in Genesis makes the same claim.http://www.answersingenesis.org/articles/tj/v12/n3/dawkins The intellectual dishonesty in both cases is obvious as there exist examples of freely available scripts implementing the algorithm which clearly do allow for the mutation of in-place characters.http://www.cbs.dtu.dk/courses/27615.mol/weasel/weasel.py
This confusion is doubtless because the fitness function used combined with a small percentage chance of mutations does not encourage regressions in small strings. Using a longer sentence and increasing the mutation chance as high as 10% tends to give regressions in many generations, even to the point where the fittest in the generation is not as fit as its progenitor. High mutation rates take longer to converge on the wanted solution, which may seem at first somewhat counter intuitive.
==See also==
*Conservation of Information in Search - Measuring the Cost of Success
*Efficient Per Query Information Extraction from a Hamming Oracle
==External links==
*Evolution IS a Blind Watchmaker - A YouTube video with a more graphical display of a similar algorithm, to synthesise a clock.
==References==