Infinite Monkey Lab’s Infinite Monkey Theorem Facility: The biggest scientific experiment since CERN

Science Publications, November 2017

 

The Infinite Monkey Theorem Generator

The Infinite Monkey Theorem

If one monkey types randomly on a typewriter, he will sooner or later write by chance a meaningful text – like for example all the works of Shakespeare. It is the law of probability. This is the “Infinite Monkey Theorem“.

The Infinite Monkey Theorem Generator

We have created a live “Infinite Monkey Therorem Generator” connected to the internet. Every second,  millions of random characters are generated, 24 hours a day and 7 days a week. If a match of a  string with more then 9 letters is found in the works of Shakespeare, the result ist posted to the website. The experiment started on 15. November 2017.

So far, these are our best 3 results:

Here you can find the full list of results: Full List of Results

One monkey happily typing for eternity

One Monkey…

AltTex:waskommthier…generates random characters one after another. When he hits a “space” the string is checked against the Works of Shakespeare, if the string exists he memorizes it and continues typing until the next character is a “space”. Then he checks the complete string again against the Works of Shakespeare. If the string exists and is longer then 9 characters (including spaces) he sends it to the website and continues typing. Until he is not anymore successful. In that case, he starts all over again.

And he eats about 1 banana a day – we keep his ketons high for better performance.

See the monkey typing:

This is for illustration purpose. In the live set-up, there is no output to the screen in order to speed-up processing.

 

A bunch of Monkeys…

…have more muscles.

Let us assume that one Monkey can type an average of 23.6 characters per second (based on the average of several tests with a computer keyboard). Our system has an output of 55’556 characters per second. This corresponds to 2’354 Monkeys.

In one day, our monkey’s generate 3.3 million characters and working 24×7, 1 Trillion characters (1’750’000’000’000 = 1.75 E+12)

Time Characters.
1 day 3.33 E+4
1 month 1.01 E+12
1 year 1.75 E+12
 10 years 1.75 E+13
 100 years 1.75 E+1
 1000 years 1.75 E+15
1 Million years 1.75 E+18

The Great Shakespeare…

…wrote  43 works, including plays, sonnets and poems. A total of about 5 Million characters.

All his works contain the following types of characters:

Upper Case Letters 463’120
Lower Case Letters 3’498’475
Blanks 939’235
Numbers 141
Special Characters 231’983

For our research we have converted all the upper case in lower case, included all the spaces and removed all the numbers. The special characters have been replaced by a “blank”. Therefore our text includes a total of: 5’132’813 characters and a choice of 27 letters (a, b, c, d, … + ” “)

Let’s challange Shakespeare with a bunch of monkeys!

We have used the “Project Gutenberg’s The Complete Works of William Shakespeare” and cleaned it up.

 

 

The Math…

…does not work in our favour.

The probability to find a word with 12 characters in a text of 5 million words is 1:

There is a ridiculously low chance of finding even a matchin string with 20 characters. In fact, if you plug the numbers into a calculator, most return the result “infinity”.

To cut it short: you would need billions of monkeys, working for billions of big-bangs in order to get the job done.

It really looks bad! But after about 2.64E+10 keystrokes we have already found a string in Shakespeare with 12 characters. There is hope! 🙂

Probability only tells you how likely something is to happen, but it does not tell you when exactly it will happen. If you play the lottery, you can win the first time or you can not win after 7 million times. The whole project is based on the hope to win the lottery in the next few hundered years.

 

The Technology

The goal was to set up a reliable and cheap system, that can run for the next 100 years and can be easily replaced in case of failure. Today, if the system breaks down, there is a full soft- and hardware backup. The system can be recovered from the last point of failure, ie. counter of characters and the “probability index”.

Hardware

The hardware is a Raspberry Pi 3 connected to the internet. It is not the most powerful device, but overall the best starting point. For the moment it is still running with “household” electricity. In future the system will be powered with solar.

Software

The software is written in Python 3. The system connected 24×7 to the internet and whenever there is a good hit (>9 characters) it is send to the website. A live streaming to the internet would be desirable, but would take away too much processing speed. One of the upcoming project is to separate the processing unit from the reporting unit. But this has still to be though through. More units would mean more solar and battery power and could conflict with the goal to run the system as long as possible.

 

Upcoming Projects

“Increase processing power while maintaining a long term set-up and sharing the results”

A) MORE POWER!

  • Hardware upgrade, expandable system
  • Separating reporting unit from processing unit (soft- and hardware)

B) Create a self-sustaining system

  • Robust housing for hardware
  • Solar powered

C) Live distribution of monkey results

  • Integration with IoT
  • live streaming of results

Changelog

02.05.2018: Moved hosting to another company for better speeds and technical possibilites. Well, the whole thing turned into a mess, but is solved 90% now.

12.01.2018: removed unnecessary lines from the code

05.01.2018: Latests results from the monkeys are directly posted to the blog

26.12.2017: Removed the counter which sends “alive-signal” after 100’000’000 characters typed. The modification improvee processing speed by 11%. (We have now a total of 2’350 monkeys employeed.)

15.11.2017: Start-up of the infinite monkey theorem generator. 2’325 monkeys are employeed.