Slashdot Mirror


A Few Million Virtual Monkeys Randomly Recreate Shakespeare

First time accepted submitter eljefe6a writes "On September 23 at 2:30 PST the A Million Amazonian Monkeys project successfully recreated A Lover's Complaint. This is the first time a work of Shakespeare has actually been randomly reproduced. It is one small step for a monkey, one giant leap for virtual primates everywhere. From the article: '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.'"

5 of 312 comments (clear)

  1. HRmm...... by malakai · · Score: 5, Insightful

    If i'm understanding this, this isn't as cool as it seems. It seems like his 'monkeys' are just randomly creating words, and he matches those words against any word used in Shakespeare. If he gets a match, he marks that one as done. So, as some point one monkey made the word "be" and all of a sudden green lights all over the place.

    I think the original saying was how random and unique it would be for a solid set of strings to randomly create a whole piece of work _in one go_ . Not a word here, a word there, OMG 100% of Shakespeare words have been randomly created.

    1. Re:HRmm...... by Dan+East · · Score: 5, Insightful

      Exactly. So if it's going to be done in this way, then why not break it down into INDIVIDUAL characters. Have a monkey generate a single letter, and see if that happens to match something one of Shakespeare's works. I bet that algorithm would be even faster.

      --
      Better known as 318230.
  2. Does anyone else think this is supid? by nzac · · Score: 5, Insightful

    and that he missed the point of the expression?

    Of course it will work the Mersenne twister will eventually cover the entire 9 letter space and then he can search though for the parts that match (yes he is doing it concurrently but that’s just an inefficient way of doing it). If he had the RAM and time he could eventually recreate every book possible.

    The Wikipedia page explains it better that infinite random sting is bound to contain something that is perceived as useful. Of course the literal take on on the expression is the most funny.

  3. It is in fact virtually impossible by martin-boundary · · Score: 5, Insightful
    This experiment, while fun, isn't exactly the infinite monkey experiment.

    What's happening here (if I understand the writeup) is that the monkeys are typing random letter combinations, until they hit a small phrase that happens to be in shakespeare. Then that phrase is marked as done.

    Let n be the size in characters of the target phrase. If n=1, then the complete works of shakespeare are obtained as soon as each of the letters of the alphabet have been typed at least once. You could do this in a few seconds on your computer keyboard. If n=2, then the complete works are obtained as soon as all the possible pairs of letters have been typed. The experiment in TFA has n=9 I think.

    As n grows larger, the time until completion grows exponentially. Once his expeiment is done, the case n=10 should take roughly 26 times as long (ignoring punctuation capitals and diacritical marks). Alternatively, it would require a cloud roughly 26 times bigger to do it in the same amount of time.

  4. Re:Frankly, that's cool by Oligonicella · · Score: 5, Informative

    Beyond that, it didn't even accomplish it's goal. The idea is not that a hundred or more monkeys can hammer out nine character chunks that could be assembled *by man* into the complete work, it is that a hundred monkeys could hammer at typewriters for some undetermined length of time and one of them would randomly produce the complete work *alone*.

    That didn't happen.