Related simulations

Richard Dawkin’s Weasel

In his book, “The Blind Watchmaker”, Richard Dawkins uses the example of a child monkey Shakespeare to illustrate how natural selection can produce unlikely results. Could a monkey accidentally type the Hamlet line “methinks it is like a weasel”? The chances are virtually zero. But suppose that every correct letter becomes fixed. Then as the child taps away, more and more of the string will match the target, until an exact match is reached.

This demonstration shows the process in action. To use this model, just enter any text line and click GO. It is astonishing how the right line can evolve!

Note that this demo works slightly different than the model described by Dawkins in his book. We are grateful to Dr. W. R. Elsberry for pointing this out and for highlighting the differences. In the original model the letters do not become fixed. Instead, at each generation (i.e. step) a number of mutant strings are produced from the current copy by randomly changing some letters. The mutants are considered to be chosen for the next generation. The chosen string is the one that most resembles the target string.

The results of the model presented here and of the original Dawkins model are essentially the same: at each step either a “better” string is produced or something quite similar to the current version is retained. As a usual consequence, current strings are replaced with new strings that have at least as many matches as the previous one. We have created a more elaborated version of the weasel â€“ the genetic algorithm weasel. That version incorporates the selection process as it is described by Dawkins and extends his model with some features commonly found in genetic algorithms.