Virtual monkeys have successfully randomly recreated A Lover’s Complaint and The Tempest. The question is, why?
You’ve likely heard about the infinite monkey theorem. It states that an infinite number of monkeys using an infinite number of typewriters over an infinite period of time would eventually pound out the complete works of William Shakespeare. While the theorem has been mathematically proven (Wikipedia calls the proof “straightforward”, although it’s anything but to me!), that seems not to have been good enough for software developer Jesse Anderson. He wanted actual proof and so he’s set a lot of monkeys to work – a few million of them, actually.
The technical explanation is as follows (copied from Jesse’s website):
For this project, I used Hadoop, Amazon EC2, and Ubuntu Linux. Since I don’t have real monkeys, I have to create fake Amazonian Map Monkeys. The Map Monkeys create random data in ASCII between a and z. It uses Sean Luke’s Mersenne Twister to make sure I have fast, random, well behaved monkeys. Once the monkey’s output is mapped, it is passed to the reducer which runs the characters through a Bloom Field membership test. If the monkey output passes the membership test, the Shakespearean works are checked using a string comparison. If that passes, a genius monkey has written 9 characters of Shakespeare. The source material is all of Shakespeare’s works as taken from Project Gutenberg.
Okay, so Jesse isn’t using real flesh-and-blood primates for his test. The monkeys are actually computer programs running on Amazon’s cloud servers that output random sequences of text. That text is then compared to the text of Shakespeare’s works and if a match is found … bingo! To date, the virtual moneys have run through five trillion character groups, completing A Lover’s Complaint on September 23rd and The Tempest on September 26th.
Here’s what Jesse has to say about the monkeys:
My only question is – why, Jesse, why?
[Source: Boing Boing]