Do monkeys even know about iambic pentameter?

I just read a BBC News online report about a project to simulate an infinite number of monkeys with an infinite number of typewriters to see if they can come up with the works of William Shakespeare. Since it is a computational exercise, there is a limit to the number of monkeys that can be simulated.  

The brainchild of (US programmer) Jesse Anderson, a few million virtual monkeys are randomly spitting out nine-character strings. These strings are then compared to Shakespeare's work for matches. If the string appears anywhere within the Bard's catalog (punctuation and spaces are ignored for ease of comparison), then the string is a success.

Initially started on the Amazon EC2 cloud, the project has been moved to a home PC. (At almost $20 per day in computation time expenses, I'd want a more economical option, too.) I hope Mr. Anderson has a multi-core processor since, according to the report, there are "5.5 trillion different combinations of any nine characters from the English alphabet."

Of course, for me the big flaw is that there is no order to the random scribblings of the simulated simians. A set of consecutive strings something like...
rvxtobeor nottobeth atisthequ estionalp


 ...would be so much more impressive. I guess, even processing in parallel, that restriction might take a bit longer.

It's an interesting project, nonetheless. Not the kind of thing that you might give as a homework assignment, but something of an intriguing search problem with several parallel approaches (just off the top of my head).
For more complete information about compiler optimizations, see our Optimization Notice.


anonymous's picture

The answer to why is that it was just a random test to measure the number of comparisons the cloud could do, The fact it actually worked was kind of just an accident.

Kathy F. (Intel)'s picture

Simulate Simians - I'd like to see just that. Another great blog Clay - your musings go in such interesting directions.

anonymous's picture

That is fascinating on a level. On another one I can't keep from wondering.... why...? Guess I have to read the article you linked to in order to find out.

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.