A Million Virtual Monkeys Trying To Type The Works of Shakespeare

August 23rd, 2011

During the review process of our article on FantasySCOTUS, one journal editor made a comment about couldn’t a large number of people making predictions get it right, alluding to the infinite monkey theorem.  I responded to that comment here. Now, to supplement that work, a programmer has developed a simulation to randomly recreate every work of Shakespeare.

And that is what I did (am doing).  I created millions of monkeys on Amazon and put them at virtual typewriters (aka Infinite Monkey Theorem).

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.

So far, they failed. Not enough monkeys, I suppose.