Home > Sync > Blog > News > Science > Virtual monkeys recreate the work of Shakespeare
N September 29, 2011 at 7:00 am

Virtual monkeys recreate the work of Shakespeare

By Comments (17)

Virtual monkeys have successfully randomly recreated A Lover’s Complaint and The Tempest. The question is, why?


Image Credit: New York Zoological Society

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]






Comments (17)

  • Richard says:

    I don’t believe this one. For one thing, computer programs don’t actually generate random numbers. More importantly, did it actually generate full copies or just a few characters here and there that were then cherry picked for inclusion in a collection until they finally built a full copy of a work, which is far from accomplishing what the artiocle claims.

  • Twolane says:

    Okay, how, exactly, is anyone going to get an actual monkey to sit at a typewriter for this endurance race, let alone thousands (millions?)? And where are they going to find the typewriters, since they are no longer manufactured? Supposing they find the typewriters and the monkeys, who’s going to change the pages in the typewriter? And the ribbons?

  • Bob says:

    This theoretical monkey exercise has been used in the past to “prove” that given enough time and opportunity, the impossible can happen. This is used to “prove” that the fairy tale for grownups (biological evolution) is a probability. Evolution is a belief system, not a proven fact. If anything, the monkey example shows that evolution in the broad sense is impossible — but people will continue to believe it because the only other plausible alternative is a Creator. A simple mathematical exercise will demonstrate the futility of such desperate “proofs”.

    • Jack says:

      What were you smoking? The monkey theory has nothing to do with evolution, it is about how in an infinite number of randomness there would eventually be something coherent. An infinite number of monkeys typing on an infinite number of typewriters would eventually come up with everything ever written and everything that could be written. The reason they chose monkeys has more to do with the fact that, for example, a horse never could use a typewriter. And by the way, evolution is not a belief system, it’s a fact. Divine creation, on the other hand, is a denial system.

    • lol says:

      Hey Bob,

      Get of the Jesus kick…he died for your sins…not mine…he can kiss my evolutionary rear end.

      You right wing Jesus freaks literally scare the Jesus right out of me…

      Thank god for that…I hate religion and all the morons that go with it…

      The Earth is flat…the Earth is the centre of the Universe…God exists…

      All religious fairy tales that have been proven wrong…

      The last one is coming soon…

  • monkey says:

    wecty werut7ion oi[m[ afdhutik trjb etj

  • Sharker says:

    Lol at Bob.. So afraid to actually think, he must mindlessly regurgitate from a trash fiction novel called the Bible.. You mad Bro?

  • nanny says:

    It’s a virtual waste of time. But at least they weren’t using real monkeys.

  • lol says:

    people are dumber than toasters…

    the theory is no longer a theorem as it has been PROVEN beyond a shadow of a doubt.

    In probability theory all probabilities sum to 1 when taken to infinity. That means that every outcome will occur. No matter how unlikely.

    Therefore, the complete works of Shakespeare will be reproduced by 1 monkey on 1 typewriter given infinite amount of time. VERY SIMPLE…

    It is also called the Law of Large Numbers…but that might be too complicated for those that think reality TV is real…lol

    People went to school…University to learn these proofs and equations and simply put, pass the rest of us in their chosen fields…

    What arrogance the human race has to challenge so boldly, such a simple and easily proven theory.

    IDIOTS are everywhere…the real problem is that they breed and vote

About Sync

Sync [singk] : harmony or harmonious relationship

Here at Sync, we strive to bring you the latest in news, reviews and opinions from the tech universe. It′s our way of helping to keep Canadians in sync with tech and gadgets that surround us in our daily lives. Never miss a beat: stay in Sync.

Read more about the bloggers.

/*YM SCRIPT*/ /*Bell SCRIPT*/