Evolution, Shakespeare, and Weasels

| July 2, 2012

How can anything creative happen through a ranodm process operating over a long period of time?

This is a question frequently asked by those who are learning about the theory of evolution. And indeed, when you throw a pair of dice over and over again, you find that different numbers just come up randomly all with an equal chance of occurring with no pattern at all. Sometimes the objection is offered colorfully as, “An infinite number of monkeys working with an infinite number of typewriters could not produce the works of Shakespeare!”

The answer from evolutionary theory is that natural selection guides the process by weeding out those random variations that hinder the organism’s chance of living to reproduce and pass on its particular variations. But that leaves some people asking another question:

How can a selection process that only removes possibilities produce anything creative?

The answer is that a random process operating by itself could not produce the novelty and diversity of life on Earth. And it is also true that a selection process simply removes possibilities, so by itself, it could not produce the novelty and diversity of life on the planet.

What is not so obvious is that the three processes, random variation, natural selection, and inheritance can produce novelty and diversity when operating together. And it appears from 150 years or more of study that these are the very processes that led to the diversity of life on the planet.

Way back in the days of the Apple II computer, Richard Dawkins wrote a simple computer program in Apple Basic that demonstrated how these three processes working together can accomplish something. Calling on the Shakespeare objection, Dawkins chose a line from Shakespeare’s Hamlet that goes, “Methinks it is like a weasel.”

The Weasel program models random variation, selection, and inheritance as simply as possible. The idea is not so much to demonstrate that evolution is possible, but rather its goal is to simply show how the three processes can produce something that is non-random.

I have created my own version of the Weasel program in Microsoft’s Silverlight so I could place it at the bottom of this article for your amusement. The idea is to use strings of characters to represent genetic material. Weasel starts with an arbitrary string I call “Starting Critter” and evolves the starting critter to match another arbitrary string called the “Target Critter”.

It works by declaring the starting critter as the first parent. And then 10,000 copies of the parent string are created to represent the children of the parent. As each copy is made, up to three random mutations are introduced into the copy. The location in the copied string for each mutation is chosen at random. And the mutation can either be an insertion of a randomly chosen new character, a deletion of a character, or a substitution of a new randomly chosen character in the place of an existing one. So as a result, the parent gives birth to 10,000 children who are all slightly different from the parent and each other by up to three random modifications.

Then each of the 10,000 child strings are compared to the target critter string.  The child who is most like the target string is chosen to be the next parent. The remaining 9,999 children are deleted. Life is tough in Weasel world. With the newly chosen parent, the process is run again to choose yet another parent. The process finally stops when the newly chosen parent is identical to the target string.

Feel free to experiment with Weasel with starting and target critter strings of your choice. One caveat is that the target string should consist of only lower case letters, spaces, and periods. If you use any other characters, they will be removed just when the evolution process begins.   When you press the “Evolve” button, the program will start evolving the starting critter towards looking like the target critter, showing the parent critter of each generation.

Tags: , , , ,

Category: Defending Evolution

About the Author ()

Comments are closed.