A Million Virtual Monkeys Randomly Mashing Typewriters Have Almost Written Shakespeare

We may earn a commission from links on this page.

Jesse Anderson developed a program that simulated a few million virtual monkeys randomly mashing keys on virtual typewriters in an attempt to re-create Shakespeare. Amazingly, the monkeys (monkeys!) have managed to write 99.99% of Shakespeare's poem, A Lover's Complaint.

Anderson created his virtual monkey experiment to prove the long standing saying of how an infinite number of monkeys with an infinite number of typewriters and an infinite amount of time could write Shakespeare. Of course, it's not all the monkey's wit and typing dexterity in play here. Anderson had to lend a helping hand. Here's how the virtual monkeys are designed:

Mr Anderson's virtual monkeys are small computer programs uploaded to Amazon servers. These coded apes regularly pump out random sequences of text. Each sequence is nine characters long and each is checked to see if that string of characters appears anywhere in the works of Shakespeare. If not, it is discarded. If it does match then progress has been made towards re-creating the works of the Bard.


So by introducing these constraints to the experiment, monkeys have gotten 99.99% of the way to Shakespeare. If the constraints didn't exist though, mathematicians say it would take "far, far longer than the age of the Universe" for monkeys to write Shakespeare. If it's any consolation, I think it'd take humans not named William Shakespeare that long too. Check out the full explanation of the experiment at Jesse Anderson's website here. [Jesse Anderson via BBC, Image Credit: ChipPix / Shutterstock.com]