Virtual Monkeys Recreate the Works of Shakespeare

The infinite monkey theorem proposes that a group of monkeys, or even a single one, could reproduce the collected works of William Shakespeare by hitting random keystrokes if given sufficient time. It is, however, hard to prove this theorem with an experiment that uses actual monkeys. So computer engineer Jesse Anderson created a simulation that successfully reproduced 99.9% of the Bard's published writings:

"The computer program I wrote compares that monkey's gibberish to every work of Shakespeare to see if it actually matches a small portion of what Shakespeare wrote. If it does match, the portion of gibberish that matched Shakespeare is marked with green," Andersen explained on his blog. "The parts of Shakespeare that have not been found are colored white. This process is repeated over and over until the monkeys have created every work of Shakespeare through random gibberish."

Anderson developed the project to test Amazon's web servers, but also to satisfy his curiosity of whether an infinite number of monkeys could randomly reproduce Shakespeare's work by pecking away on an infinite number of typewriters.


Link -via Geekologie | Photo by Flickr user Jemima G used under Creative Commons license

Newest 5
Newest 5 Comments

Interesting; Currently I'm taking notice of what is called an "Ouroboros Avatar" or "Multiquine" which is based on Quine's f{f} = f, put in words as:

"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.

Multiquines are self-referential and self-representational. They produce a program from their source code, which then produces its own source code from its program and its own program from the source code it discovers through self-reference.

Example: HTML Web Page That Shows Its Own Source Code
http://www.win.tue.nl/~wstomv/edu/javascript/quine.html

I think this will approximate reality better than an infinite series finities.
Abusive comment hidden. (Show it anyway.)
If I understand what he's explaining on his blog, a "match" is a string of 9 characters (spaces and punctuation not included) that can be found in any of the works of Shakespeare.
So yes, with this method of selection I'd expect the memoirs of Paris Hilton to be written and improved in about 15 seconds.
Abusive comment hidden. (Show it anyway.)
A similar demonstration was performed in The Genius of Charles Darwin, a documentary written and presented by evolutionary biologist Richard Dawkins as a simple demonstration of the non-random force of natural selection.

If the random keystroke (random mutation) is advantageous (i.e. closer to a specific Shakespearian verse), it is selected for, and that letter is retained in subsequent generations of otherwise gibberish keystrokes. As a result, it takes far less time to ultimately produce a Shakespearian verse than it would if there were no force selecting for advantageous keystrokes.

The idea was to show how Hoyle's fallacy i.e. "the chance that higher life forms might have emerged in this way is comparable to the chance that a tornado sweeping through a junkyard might assemble a Boeing 747 from the materials therein" fails to take into account the non-random force of natural selection selecting for and retaining advantageous random mutations over generations.
Abusive comment hidden. (Show it anyway.)
Actually doing it with a computer program is more in tune with the true meaning of the theorem.
The "monkeys" are used as a metaphor for a random generator. And it turns out monkeys aren't very good at typing random stuff on a keyboard, as some students have apparently found useful to test:
http://news.bbc.co.uk/2/hi/3013959.stm

Excerpt: "after a month, the Sulawesi crested macaques had only succeeded in partially destroying the machine, using it as a lavatory, and mostly typing the letter "s"."
Abusive comment hidden. (Show it anyway.)
Login to comment.




Email This Post to a Friend
"Virtual Monkeys Recreate the Works of Shakespeare"

Separate multiple emails with a comma. Limit 5.

 

Success! Your email has been sent!

close window
X

This website uses cookies.

This website uses cookies to improve user experience. By using this website you consent to all cookies in accordance with our Privacy Policy.

I agree
 
Learn More