- Digital 'monkeys' with typewriters complete Shakespeare's "A Lover's Complaint"
- Project is the brainchild of a Nevada developer and aims to test the classic "Infinite Monkey Theorem"
- It began last month and will continue until The Bard's entire catalogue is reproduced
- The program types random bursts of code, crossing words off when they match Shakespeare's
It's a time-honored adage about the laws of probability: Give 1 million monkeys 1 million typewriters and they'll eventually type the entire works of William Shakespeare.
Now, a software developer in Nevada is putting that saying to the test. And his digital monkeys are off to a good start.
This weekend, Jesse Anderson wrote on his blog that a computerized simulation of the theoretical simian typing pool has completed "A Lover's Complaint," a narrative poem that appeared in a book of The Bard's sonnets.
"This is the first time a work of Shakespeare has actually been randomly reproduced," Anderson wrote. "Furthermore, this is the largest work ever randomly reproduced. It is one small step for a monkey, one giant leap for virtual primates everywhere."
Anderson's virtual monkeys began typing on August 21. Using open-source software called Hadoop, he created a huge group of "monkeys" that input random strings of gibberish. When a chunk of text matches a word used in Shakespeare's catalogue, it gets crossed off of a database of the plays and poems.
His database comes from Project Gutenberg.
So far, he said, over 5 trillion character groups have been churned out.
Based on a page updating the project's progress, several more works might be checked off the list soon. The monkeys appear to need only two more words to complete the comedy "The Tempest" and seven more to bang out "As You Like It." (There's been no explanation for why the computer monkeys seem to be lagging behind on Shakespeare's tragedies.)
"The monkeys will continue typing away until every work of Shakespeare is randomly created," Anderson wrote.
Permutations of the Infinite Monkey Theorem dates back as far as Aristotle (although he obviously didn't have a typewriter).
Anderson's inspiration came from a perhaps less likely source: "The Simpsons."
He says it harks back to a "Simpsons" scene in which Mr. Burns chains up 1,000 monkeys, giving them the task of writing a great novel and berating one of them for typing, "It was the best of times. It was the blurst of times."
Anderson's approach is, if nothing else, gentler.
"No monkeys were harmed during the making of this code," he wrote.