A Few More Million Amazonian Monkeys

A Few More Million Amazonian Monkeys

Update 5: The monkeys recreated every work of Shakespeare and went viral. See the project project postmortem for my thoughts on going viral and what I learned during the project.

Update 6: I created a new visualization of the monkeys’ data.

Update 4: The monkeys recreated “A Lover’s Complaint”. Check out the write up.

Update 3: Welcome Slashdot, Fox News, Engadget and Japanese Engadget. So far, the monkeys have ran through 7.5 trillion 6.5 trillion 5 trillion (2011-09-22) 4 trillion (2011-09-16) 3 trillion (2011-09-10) 2.5 trillion (2011-09-07) 2 trillion (2011-09-05) 1.5 trillion (2011-09-01) 1 trillion (2011-08-28) 515,912,000,000 (2011-08-25) character groups.

In a recent post, I described a recent project to recreate Shakespeare using Hadoop and Amazon EC2.  This time, I am going to recreate every work of Shakespeare randomly.

This project comes from one of my favorite Simpsons episodes which has a scene where Mr. Burns brings Homer to his mansion (YouTube Video). One of his rooms has a thousand monkeys at a thousand typewriters. One of the monkeys writes a slightly incorrect line from Charles Dickens ‘It was the best of times, it was blurst of times.’  The joke is a play on the theory that a million monkeys sitting at a million typewriters will eventually produce 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).

Less Technical Explanation

Instead of having real monkeys typing on keyboards, I have virtual, computerized monkeys that output random gibberish. This is supposed to mimic a monkey randomly mashing the keys on a keyboard. The computer program I wrote compares that monkey’s gibberish to every work of Shakespeare to see if it actually matches a small portion of what Shakespeare wrote. If it does match, the portion of gibberish that matched Shakespeare is marked with green in the images below to show it was found by a monkey. The table below shows the exact number of characters and percentage the monkeys have found in Shakespeare. The parts of Shakespeare that have not been found are colored white. This process is repeated over and over until the monkeys have created every work of Shakespeare through random gibberish.

Technical Explanation

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.

The monkeys’ data from Amazon’s cloud is updated on this site every 30 minutes.  The images below show green for every character group that was found and white for those that are still missing.  The images output is kind of like the animations for defrag utilities.  As the monkeys progress through the works, more and more character groups will be found and show green.

The Tabular Output Of What Has Been Found

Loading Results… (Will only work on jesse-anderson.com due to browser security restrictions, go here)

Every Work Of Shakespeare

All Works of Shakespeare

All Works of Shakespeare

Progress Through Individual Works Of Shakespeare

A Lovers Complaint

A Lovers Complaint

Loves Labours Lost

Loves Labours Lost

The Merchant Of Venice

The Merchant Of Venice

The Tragedy Of Julius Caesar

The Tragedy Of Julius Caesar

A Midsummer Nights Dream

A Midsummer Nights Dream

Measure For Measure

Measure For Measure

The Merry Wives Of Windsor

The Merry Wives Of Windsor

The Tragedy Of King Lear

The Tragedy Of King Lear

Much Ado About Nothing

Much Ado About Nothing

The Tragedy Of Macbeth

The Tragedy Of Macbeth

Alls Well That Ends Well

Alls Well That Ends Well

The Sonnets

The Sonnets

The Tragedy Of Othello Moor Of Venice

The Tragedy Of Othello Moor Of Venice

As You Like It

As You Like It

The Comedy Of Errors

The Comedy Of Errors

The Taming Of The Shrew

The Taming Of The Shrew

The Tragedy Of Romeo And Juliet

The Tragedy Of Romeo And Juliet

Cymbeline

Cymbeline

The Tempest

The Tempest

The Tragedy Of Titus Andronicus

The Tragedy Of Titus Andronicus

King Henry The Eighth

King Henry The Eighth

The First Part Of King Henry The Fourth

The First Part Of King Henry The Fourth

Second Part Of King Henry IV

Second Part Of King Henry IV

The First Part Of Henry The Sixth

The First Part Of Henry The Sixth

The Second Part Of King Henry The Sixth

The Second Part Of King Henry The Sixth

The Third Part Of King Henry The Sixth

The Third Part Of King Henry The Sixth

The Two Gentlemen Of Verona

The Two Gentlemen Of Verona

King John

King John

The History Of Troilus And Cressida

The History Of Troilus And Cressida

The Tragedy Of Antony And Cleopatra

The Tragedy Of Antony And Cleopatra

The Winters Tale

The Winters Tale

King Richard III

King Richard III

The Life Of King Henry The Fifth

The Life Of King Henry The Fifth

The Tragedy Of Coriolanus

The Tragedy Of Coriolanus

Twelfth Night Or What You Will

Twelfth Night Or What You Will

King Richard The Second

King Richard The Second

The Life Of Timon Of Athens

The Life Of Timon Of Athens

The Tragedy Of Hamlet Prince Of Denmark

The Tragedy Of Hamlet Prince Of Denmark

Update: I was running this on a free micro instance (600 MB RAM) from Amazon. Alas, the monkeys needed more RAM than the free micro instance had and the processes get out of memory errors. I have moved the Hadoop server to my home computer which is much faster and has more memory.

Update 2: I updated the Hadoop configuration to have less idle CPU time. This will significantly increase the monkey power and find more character groups.

Update 4: I made a small change to how memory is allocated for the random character groups. It should help speed things up again.

No comments

Trackbacks/Pingbacks

  1. Spry Yeti » A Million Monkeys - [...] http://www.jesse-anderson.com/2011/08/a-few-more-million-amazonian-monkeys/ Share/Bookmark Categories: Development, Software Craftsmanship, Technology Tags: …
  2. Simulated monkey typing project is the best, blurst of times | iPhone 2 die 4 - [...]  |  Jesse Anderson  | Email [...]
  3. Simulated monkey typing project is the best, blurst of times | Technology Blog - [...]  |  Jesse Anderson  | Email this | Comments AKPC_IDS += "185535,";Popularity: unranked [?] [...]
  4. Simulated monkey typing project is the best, blurst of times « Cyber Nation - [...]  |  Jesse Anderson  | Email [...]
  5. Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email this | Comments [...]
  6. Simulated monkey typing project is the best, blurst of times | Dschool - [...]  |  Jesse Anderson  | Email [...]
  7. Simulated monkey typing project is the best, blurst of times « Geek City - [...]  |  Jesse Anderson  | Email [...]
  8. Simulated monkey typing project is the best, blurst of times | Ashton Kusher - [...]  |  Jesse Anderson  | Email this | Comments Engadget Posted in Technology Tags: Best, blurst, [...]
  9. Simulated monkey typing project is the best, blurst of times | Dominic Fallows - [...]  |  Jesse Anderson  | Email [...]
  10. Simulated monkey typing project is the best, blurst of times - Trotting Weasel - [...]  |  Jesse Anderson  | Email this | Comments Posts, Tech [...]
  11. Simulated monkey typing project is the best, blurst of times | All Things Hack - [...]  |  Jesse Anderson  | Email this | Comments Engadget Tags: Best, blurst, Monkey, Project, [...]
  12. Simulated monkey typing project is the best, blurst of times | Stay updated with the latest technology as it comes out - [...]  |  Jesse Anderson  | Email this | Comments Engadget {thumbnail} [...]
  13. Simulated monkey typing project is the best, blurst of times | X-ZOOM Info - [...]  |  Jesse Anderson  | Email this | Comments Tags: amazon ec2, tracey ullman, jesse [...]
  14. Simulated monkey typing project is the best, blurst of times | MAXINITY - [...]  |  Jesse Anderson  | Email this | Comments Tags: amazon ec2, western literature, jesse anderson, [...]
  15. Simulated monkey typing project is the best, blurst of times | News Bottle - [...]  |  Jesse Anderson  | Email this | Comments Easy AdSense by Unreal Tags: amazon ec2, …
  16. Simulated monkey typing project is the best, blurst of times | InforZoom - [...]  |  Jesse Anderson  | Email this | Comments Related Posts :Sharp RW-T107 Android tablet [...]
  17. Simulated monkey typing project is the best, blurst of times | InforStreams - [...]  |  Jesse Anderson  | Email this | Comments Tags: western literature, random data sets, [...]
  18. Simulated monkey typing project is the best, blurst of times | DigiMpire - [...]  |  Jesse Anderson  | Email this | Comments Tags: amazon ec2, jesse anderson, western [...]
  19. Simulated monkey typing project is the best, blurst of times | Torrent Nova - [...] Jess&#101&#32&#65nderson [...]
  20. Simulated monkey typing project is the best, blurst of times | NewsCentor - [...]  |  Jesse Anderson  | Email this | Comments Tags: amazon ec2, random data sets, tracey ullman, [...]
  21. Simulated monkey typing project is the best, blurst of times | MAXINITY.net - [...]  |  Jesse Anderson  | Email this | Comments Tags: amazon ec2, jesse anderson, random data …
  22. Simulated monkey typing project is the best, blurst of times | Donald Schwartz - [...]  |  Jesse Anderson  | Email this | Comments This entry was posted …
  23. Simulated monkey typing project is the best, blurst of times | NewsMpire - [...]  |  Jesse Anderson  | Email this | Comments Tags: western literature, jesse anderson, [...]
  24. Simulated monkey typing project is the best, blurst of times | PUII - News Blog - [...]  |  Jesse Anderson  | Email this | Comments Tags: random data sets, tracey ullman, jesse …
  25. Simulated monkey typing project is the best, blurst of times | RicciAngel News - [...]  |  Jesse Anderson  | Email this | Comments This entry was posted in Technology & Gadget [...]
  26. Simulated monkey typing project is the best, blurst of times | Tech Gadget Reviews - [...]  |  Jesse Anderson  | Email [...]
  27. Simulated monkey typing project is the best, blurst of times « ittechnworld - [...]  |  Jesse Anderson  | Email [...]
  28. Simulated monkey typing project is the best, blurst of times | The Final Castle - [...]  |  Jesse Anderson  | Email this | Comments [...]
  29. Simulated monkey typing project is the best, blurst of times | My Shitty Blog - [...]  |  Jesse Anderson  | Email this | Comments Read more from tech …
  30. AuxiliumRights » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email this | Comments [...]
  31. Janice Kwok » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  32. Simulated monkey typing project is the best, blurst of times | XSDirect - [...]  |  Jesse Anderson  | Email this | Comments This entry was posted in all. Bookmark the [...]
  33. Simulated monkey typing project is the best, blurst of times | Gadgets Addict - [...]  |  Jesse Anderson  | Email [...]
  34. Simulated monkey typing project is the best, blurst of times | NuzaRazzi - [...]  |  Jesse Anderson  | Email [...]
  35. Simulated monkey typing project is the best, blurst of times | EconoLan - [...]  |  Jesse Anderson  | Email this | Comments Posted in Engadget « National Spongecake Day [...]
  36. OPISO » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  37. Simulated monkey typing project is the best, blurst of times | Best Information About The Latest Technology - [...]  |  Jesse Anderson  | Email [...]
  38. Simulated monkey typing project is the best, blurst of times | Funkburg.at - Blog - [...]  |  Jesse Anderson  | Email [...]
  39. Simulated monkey typing project is the best, blurst of times | Ipad and Iphone World - [...]  |  Jesse Anderson  | Email this | Comments var addthis_pub = ''; var addthis_language = [...]
  40. Simulated monkey typing project is the best, blurst of times | Mash Times - [...]  |  Jesse Anderson  | Email this | Comments Read more « South …
  41. Simulated monkey typing project is the best, blurst of times | hiPinoy Portal - [...]  |  Jesse Anderson  | Email this | Comments Related postsiOS 5 beta 5 finally gets its jailbreak, [...]
  42. Simulated monkey typing project is the best, blurst of times | errorwindow.info - [...]  |  Jesse Anderson  | Email [...]
  43. Simulated monkey typing project is the best, blurst of times | Digital Brain ; Science and Technology News - [...] | Jesse Anderson | Email this | [...]
  44. Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  45. Blogg Demo » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  46. Simulated monkey typing project is the best, blurst of times | chatroulette llc - [...]  |  Jesse Anderson  | Email [...]
  47. Jacob Leisher » Blog Archive » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  48. Simulated monkey typing project is the best, blurst of times « AcumenConcepts.net – Web Design – Search Engine Optimization – PC Repair - [...]  |  Jesse Anderson  | Email this | Comments [+] Share & Bookmark • Twitter • [...]
  49. Simulated monkey typing project is the best, blurst of times | Blog on iPod-iPhone - [...]  |  Jesse Anderson  | Email this | Comments Posted in ipod news • Tags: Amazon Ec2, [...]
  50. Dear Internet, Signed: Anonymous » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  51. Simulated monkey typing project is the best, blurst of times | NewGadget.Info - [...]  |  Jesse Anderson  | Email [...]
  52. Simulated monkey typing project is the best, blurst of times | Tech News - [...]  |  Jesse Anderson  | Email [...]
  53. Simulated monkey typing project is the best, blurst of times | Oranum Scam - [...]  |  Jesse Anderson  | Email [...]
  54. Simulated monkey typing project is the best, blurst of times « miltonkeynesbedsits.co.uk - [...]  |  Jesse Anderson  | Email [...]
  55. Rachel Levak » Blog Archive » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  56. Haley Geier » Blog Archive » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  57. Jeff’s Home » Blog Archive » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  58. Simulated monkey typing project is the best, blurst of times | Basement Slabbing - [...]  |  Jesse Anderson  | Email [...]
  59. Simulated monkey typing project is the best, blurst of times : Fat People Making Out - [...]  |  Jesse Anderson  | Email [...]
  60. Simulated monkey typing project is the best, blurst of times | www-eggprotein.com - [...]  |  Jesse Anderson  | Email [...]
  61. Simulated monkey typing project is the best, blurst of times | Computer Data Storage - [...]  |  Jesse Anderson  | Email [...]
  62. Simulated monkey typing project is the best, blurst of times | Gadget & Tech News - [...]  |  Jesse Anderson  | Email [...]
  63. Simulated monkey typing project is the best, blurst of times | MasFajar - [...]  |  Jesse Anderson  | Email this | Comments Share/Bookmark Category: Article | Tags: linux, ubuntu …
  64. Simulated monkey typing project is the best, blurst of times | My Blog - [...]  |  Jesse Anderson  | Email [...]
  65. Geek 3 Web Articles » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  66. Simulated monkey typing project is the best, blurst of times | Tarlan Zaltash - [...]  |  Jesse Anderson  | Email [...]
  67. Richard Sapp » Blog Archive » Simulated monkey typing project is the best, blurst of times - [...]  |  Jesse Anderson  | Email [...]
  68. Simulated monkey typing project is the best, blurst of times | Backlink Energiser 2 - [...]  |  Jesse Anderson  | Email [...]
  69. Simulated monkey typing project is the best, blurst of times : learngeek.org - [...]  |  Jesse Anderson  | Email this | Comments Digg this post Recommend on Facebook Share with [...]
  70. Simulated monkey typing project is the best, blurst of times | Movie Bites - [...]  |  Jesse Anderson  | Email [...]
  71. Simulated monkey typing project is the best, blurst of times | Alive - [...]  |  Jesse Anderson  | Email [...]
  72. Simulated monkey typing project is the best, blurst of times | Scripting4You Blog - [...]  |  Jesse Anderson  | Email this | Comments Technology Facebookfacebook TwitterTwitter [...]
  73. Simulated monkey typing project is the best, blurst of times « android-alert - [...] Tue, 23 Aug 2011 02:26:00 EDT. Please see our terms for use of feeds. Permalink   |  Jesse Anderson  | Email …
  74. Summer – best time for creativity : Smashinglabs - [...] Infinite Monkey Theorem - http://www.jesse-anderson.com/2011/08/a-few-more-million-amazonian-monkeys/ [...]
  75. Simulated monkey typing project is the best, blurst of times | wizteq.com - [...]  |  Jesse Anderson  | Email [...]
  76. This is so cool: A Few More Million Amazonian Monkeys | | My Startup AdventureMy Startup Adventure - [...] A Few More Million Amazonian Monkeys Posted on August 26, 2011 by Joao Mota …
  77. Re: Shakespeare, Monkeys, Amazon EC2 — Elliott C. Back - [...] tried leaving this as a reply to Jesse Anderson’s A Few More Million Amazonian Monkeys but the blog comments …
  78. A Few More Million Amazonian Monkeys | Jesse Anderson « minimal - [...] A Few More Million Amazonian Monkeys | Jesse Anderson. [...]
  79. 無限のクラウド猿でシェイクスピア作品を再構築 - [...] Read(情報元)   [...]
  80. 让猴子敲出莎士比亚全集 | Hot Trends - [...] 信息及图片来源: jesse-anderson [...]
  81. Jesse Anderson 「無限のクラウド猿定理」でシェイクスピアを再構築 | 旬言 - [...] Jesse Anderson 「無限のクラウド猿定理」でシェイクスピアを再構築 Posted on 2011年8月29日 by Haruka Ueda| コメントは受け付けていません。 文法を理解しない猿であっても、延々とランダムにタイプライターを叩き続ければ、いつかシェイクスピアのような作品を作ることができるのではないか......この「無限の猿の定理」などと呼ばれる比喩を、実際に確かめようとしている人がいます。Jesse …
  82. iPhone & iPad 旬のネタ » Acer のウルトラブックは13.3型・13mm厚の Aspire 3951、9月発売について - [...] Read | Permalink | Email this | Comments [...]
  83. The Works of Shakespeare, Produced by Millions of ‘Amazonian Monkeys’ – Devon - [...] weekend, a million monkeys will reconstruct a work of Shakespeare, claims programmer and record fan Jesse [...]
  84. State of Data #66 « Dr Data's Blog - [...] Infinite Monkey Theorem and Big Data – Can Shakespearian literature be produced out of random? [...]
  85. Jon Lund » Blog Archive » Aber skriver Shakespeare – for meget snak gør alle dumme - [...] være eller ikke være Den amerikanske softwareudvikler Jesse Anderson har for tiden et spændende eksperiment i gang, der skal …
  86. Millioner af virtuelle aber skriver Shakespeare « Jon Lund « blog.politiken.dk - [...] amerikanske softwareudvikler Jesse Anderson har for tiden et spændende eksperiment i gang, der skal kaste lys over det gamle …
  87. A Few Million Monkeys Randomly Recreate Shakespeare | Jesse Anderson - [...] is randomly created.  Until then, you can continue to view the monkeys’ progress on that page.  I am making …
  88. 左岸博客 » 百万虚拟猴子写出莎翁作品 - [...] 太平洋标准时间9月23日2:30,百万猴子测试项目A Million Amazonian Monkeys成功创作出了莎士比亚十四行诗中的一首短诗“爱人的抱怨(A Lover s Complaint)”。这是首次通过随机乱打创造出的第一个莎士比亚作品。这一壮举是一只猴子的一小步,但却是虚拟猴子们的一大步。 [...]
  89. Infinite Monkeys | Notes and Rests Make Music - [...] of Shakespeare is randomly created. Until then, you can continue to view the monkeys’ progress on that page. I …
  90. Millions of monkeys (kind of) recreate a Shakespearean poem | EconoLan - [...] Read more at Jesse Andersen’s blog or check out the monkey’s progress with Shakespeare’s other plays [...]
  91. Onsite Insite | Blog | A Few Million Monkeys Randomly Recreate Shakespeare | Jesse Anderson - [...] Shakespeare is randomly created.  Until then, you can continue to view the monkeys’ progress on that page.  I am …
  92. O teorema Macaco Infinito QED » Ceticismo.net - [...] recurso previsto pelo teorema: macacos infinitos digitando por infinitos espaços de tempo. Fonte: Site do pai da criança. …
  93. Apen doen Shakespeares werk dunnetjes over - Scientias.nl - [...] Natuurlijk zijn de virtuele apen er nog lang niet: Shakespeare heeft ongelofelijk veel geschreven. Toch is het Andersons doel …
  94. Virtual monkeys bash out Shakespeare play | Install Ubuntu - [...] Programmer Jesse Anderson, who presumably doesn’t have enough room in his back yard for a zoo, is using Hadoop, …
  95. Macacos Digitais Recriam Obra de Shakespeare | - [...] O projeto possui algumas limitações e “atalhos” – como combinar todos os macacos para obter a obra completa, mas …
  96. XTRO » Los monos, a punto de escribir las obras completas de Shakespeare - [...] informa la BBC, un programador estadounidense de nombre Jesse Anderson, inspirado en el famoso episodio de “The Simpsons” en …
  97. Czy małpy mogą odtworzyć dzieła Szekspira? Napisały już ponad 99 proc. tekstu! - [...] im to więcej czasu, niż wynosi wiek wszechświata.Postępy prac możecie obserwować na tej stronie. Jak wiadać, niektóre z utworów zostały juz napisane …
  98. The Infinite Monkey Theorem - [...] You can track the monkeys’ progress here. [...]
  99. Colorful piscine phantoms, take me away! » Human Interface Systems - [...] Virtual monkeys on virtual keyboards have recreated Shakespeare. Excellent. *Steeplefingers* (Jesse Anderson) [...]
  100. A Few Million Monkeys Randomly Recreate Every Work Of Shakespeare | Jesse Anderson - [...] people to be able to come back to the site to watch their favorite work being recreated. This round …
  101. Neat, but wrong. | blahsome - [...] is my opinion of this post by Jesse [...]
  102. Pagine improbabili « Hard Theorems - [...] In un esperimento successivo le sequenze sono state accorciate a 9 caratteri, forse per avere una frequenza di successi …
  103. Simulated monkey typing project is the best, blurst of times | Most Popular News Stories - [...]  |  Jesse Anderson  | Email this | Comments This entry was posted in Uncategorized by admin. [...]
  104. Simulated monkey typing project is the best, blurst of times | e-Smart Tech Gadgets - [...]  |  Jesse Anderson  | Email this | Comments  Share New [...]
Add Comment Register

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

© 2011-2014 Jesse Anderson All Rights Reserved