Virtual Typewriter Monkeys Pen Complete Works of Shakespeare (Almost)

Mike Kayatta

Minister of Secrets
Aug 2, 2011
2,315
0
0
Virtual Typewriter Monkeys Pen Complete Works of Shakespeare (Almost)



Fake monkeys aim to prove Shakespeare "just got lucky."

Back in 2003, the UK's Paignton Zoo decided to perform a small experiment with a group of six crested macaques and a keyboard. Its intention was to physically test the idea that given enough typewriters and time, one can expect a group of monkeys to eventually happen upon and produce Shakespeare's Hamlet. The zoo's trial run went exactly as you may expect: After a month of access to the keyboard, the monkeys had produced five pages of the letter "S" and expertly covered the test equipment in urine and feces. Now, about eight years later, US programmer Jesse Anderson has taken these unfocused monkeys (and their feces) out of the equation for good. By creating a virtual menagerie of millions of virtual monkeys, Anderson is close to proving correct this long-pondered question of probability. So far, his crack squad of pretend primates has finished 99.99 % of not just Hamlet, but the entire catalog of Shakespeare's work.

The system was built on Amazon's EC2, a scalable cloud computing system that allows web designers and programmers to perform high-level computations from consumer-grade home computers. Each "monkey" is represented by a small program that lives on the server, randomly producing nine-character-long sequences that are subsequently checked by a database of The Bard's collective musings. If the character string matches, it's kept and stored. If even one character is off, it's flung like monkey dung to the recycle bin. At first glance, it may seem like producing a correct sequence of nine characters would be easy for millions of programs designed to do nothing else, but to put that in perspective, there are approximately 5.5 trillion possible nine-character combinations in the English language from which to randomly choose.

Still, you may notice that this "evolutionary" method isn't a perfect recreation of the original thought experiment. If these monkeys were real, each attempt would be independent of a nine-character veracity check, and thereby decrease the probability of success exponentially. According to Dr. Ian Stewart, emeritus professor of mathematics at the University of Warwick, achieving Anderson's results within the parameters of the original puzzler would take "far longer than the age of the Universe," which in case you were wondering, is about 13.7 billion years. "Along the way there would be untold numbers of attempts with one character wrong; even more with two wrong, and so on," Stewart explains. "Almost all other books, being shorter, would appear [countless times] before Shakespeare did."

Still, Anderson's attempt remains impressive, and at the very least, just plain fun. With the complete works of Shakespeare totaling some 3,695,990 characters or so, and Anderson's code-monkey sweatshop at 99.99%, we can extrapolate that he is missing only 369 words from completing the library. I can only imagine, however, that the last bit will take the longest, as the number of correct sequences available has, at this point, diminished severely. Anderson reached his 99.99% within only six weeks, and since I'm too lazy to the math that would determine just how quickly his results have decelerated over time, let's just say his monkeys will be done soon. Probably.

Source: BBC [http://www.bbc.co.uk/news/technology-15060310]

Permalink
 

ryo02

New member
Oct 8, 2007
819
0
0
who cares about shakespear thats allready been written we dont need it writing again by virtual monkies.

now if they leave it running till it accidently writes something original that hasnt been written Ill be interested.

I mean really there must be more original works written by this in the time it takes to get something so specific as shakespears work why not look for those in the mass of chaos?.

correct me if Im wrong but isnt this the programming/literally equivalent of playing guess who?.
 

Adam Jensen_v1legacy

I never asked for this
Sep 8, 2011
6,651
0
0
How does this help anyone? Real monkeys could never do this because there's not nearly enough monkeys in the world to run this test the way it was supposed to be run, and even if there0 was, the probability is just too low, those monkeys would probably die before they'd achieved anything. Running a program with fake monkeys doesn't mean anything. It's already a failed test. You can't make these kind of shortcuts in science (can we honestly call this test science). Get over it. The test failed, now go do something else with your free time. Like watching the grass grow.
 

Mana Fiend

New member
Jun 8, 2009
687
0
0
Did they write it completely in order, or have they generated all the words and then these words been reordered?

What a lot of people seem to forget is that Shakespeare was not about writing high-class works, but rather about writing something which entertained people. He understood how important the acting was to making a good play (the talk to the actors in Hamlet, for example, shows this).

Yes, not all his stories were original, but in all honesty, does it matter? His work is wonderful, and touch on issues which were radical in their time, and still matter today.

That said, I do think Romeo and Juliet is overrated. Still good, but not as good as everyone exclaims. Give me Othello or Twelfth Night any day.
 

Braedan

New member
Sep 14, 2010
697
0
0
ryo02 said:
who care anout shakespear thats allready been written we dont need it writing again by virtual monkies.

now if they leave it running till it accidently writes something original that hasnt been written Ill be interested.

I mean really there must be more original works written by this in the time it takes to get something so specific as shakespears work why not look for those in the mass of chaos?.

correct me if Im wrong but isnt this the programming/literally equivalent of playing guess who?.
You really don't understand what this is about do you? they aren't trying the get the programs to write books, they're testing to see if eventually they will randomly generate the correct letters to match books that have been written.

It's obviously going to happen eventually if you set the computers up and press go. The question is why this even matters? To play mythbusters with anecdotes and proverbs that don't matter to anyone outside of using figures of speech?
 

Braedan

New member
Sep 14, 2010
697
0
0
Kwil said:
Braedan said:
It's obviously going to happen eventually if you set the computers up and press go. The question is why this even matters? To play mythbusters with anecdotes and proverbs that don't matter to anyone outside of using figures of speech?
One reason it matters is that it's further evidence that with some sort of consistent selection mechanism, order will eventually arise from chaos. Consider this in terms of evolution, where the selection mechanism is "reproduces before it dies", and apply to the point that Intelligent Design adherents make of humans being too complex to have naturally occurred.
True. Though I would assume that everyone who believes in evolution already knows this would eventually complete itself, whereas everyone who doesn't will say it's computer voodoo and this won't change their opinion.
 

Baresark

New member
Dec 19, 2010
3,908
0
0
It's interesting, but not telling in any way. The programs are basically running through the possible combinations which is completely unimpressive to me. Of course, I am not a computer programmer, and perhaps I'm looking at this and not recognizing the complexity of it... but I am quite sure they could get any book in existence this way.
 

CrystalShadow

don't upset the insane catgirl
Apr 11, 2009
3,829
0
0
Baresark said:
It's interesting, but not telling in any way. The programs are basically running through the possible combinations which is completely unimpressive to me. Of course, I am not a computer programmer, and perhaps I'm looking at this and not recognizing the complexity of it... but I am quite sure they could get any book in existence this way.
That's kind of the point. As a previous poster has pointed out, this whole idea is based on a saying... I don't quite remember what the exact saying is right now, but it is something like... "A million monkeys typing for a million years will eventually produce the complete works of shakespeare."

Or something to that effect.

But the significance of the statement is that given enough time, a completely random set of actions will eventually produce a recognisable pattern. (In this case the writings of shakespeare, but it could be anything else.)

It's saying that apparently 'intelligent' patterns can arise by chance alone.
 

ryo02

New member
Oct 8, 2007
819
0
0
The_root_of_all_evil said:
ryo02 said:
who care anout shakespear thats allready been written we dont need it writing again by virtual monkies.
I think one of the monkeys has escaped.
I didnt mean I dont care about shakesspear I meant we allready have it its a good thing but it doesnt need writing again since shakespear allready did it the first time get it?.
 

Baresark

New member
Dec 19, 2010
3,908
0
0
CrystalShadow said:
Baresark said:
It's interesting, but not telling in any way. The programs are basically running through the possible combinations which is completely unimpressive to me. Of course, I am not a computer programmer, and perhaps I'm looking at this and not recognizing the complexity of it... but I am quite sure they could get any book in existence this way.
That's kind of the point. As a previous poster has pointed out, this whole idea is based on a saying... I don't quite remember what the exact saying is right now, but it is something like... "A million monkeys typing for a million years will eventually produce the complete works of shakespeare."

Or something to that effect.

But the significance of the statement is that given enough time, a completely random set of actions will eventually produce a recognisable pattern. (In this case the writings of shakespeare, but it could be anything else.)

It's saying that apparently 'intelligent' patterns can arise by chance alone.
Was the occurrence of recognizable patterns from seemingly random events in question? I never questioned it, it's mathematically likely to occur. Also, a recognizable patter from a string of 9 characters is vastly different than if it were a string of 3 characters or a string of 100 characters. If you study genetics you know that a single minute stand of 100 base protein units can yield genetic differences more vast than the number of atoms in our galaxy. Yet, here we sit with common features and recognizable patterns. Still interesting I guess.
 

zehydra

New member
Oct 25, 2009
5,033
0
0
The_root_of_all_evil said:
ryo02 said:
who care anout shakespear thats allready been written we dont need it writing again by virtual monkies.


I think one of the monkeys has escaped.
wow I lol'd.

OT: Isn't this supposed to be an argument against the design argument (for Creationism/I.D.)?

If it is, and correct me if I'm wrong, but what exactly is this supposed to prove? I believe evolution to be true, but by my understanding of it, isn't the whole monkeys writing shakespeare an incorrect analogy? Evolution's more than just dice rolling (that is, evolution is driven by more than just random mutations)
 

Digital_Hero

New member
Jan 27, 2010
120
0
0
Huh. So can we add this to the ever-growing list of improbable things that happened before episode 3 was released? o:
 

CrystalShadow

don't upset the insane catgirl
Apr 11, 2009
3,829
0
0
Baresark said:
CrystalShadow said:
Baresark said:
It's interesting, but not telling in any way. The programs are basically running through the possible combinations which is completely unimpressive to me. Of course, I am not a computer programmer, and perhaps I'm looking at this and not recognizing the complexity of it... but I am quite sure they could get any book in existence this way.
That's kind of the point. As a previous poster has pointed out, this whole idea is based on a saying... I don't quite remember what the exact saying is right now, but it is something like... "A million monkeys typing for a million years will eventually produce the complete works of shakespeare."

Or something to that effect.

But the significance of the statement is that given enough time, a completely random set of actions will eventually produce a recognisable pattern. (In this case the writings of shakespeare, but it could be anything else.)

It's saying that apparently 'intelligent' patterns can arise by chance alone.
Was the occurrence of recognizable patterns from seemingly random events in question? I never questioned it, it's mathematically likely to occur. Also, a recognizable patter from a string of 9 characters is vastly different than if it were a string of 3 characters or a string of 100 characters. If you study genetics you know that a single minute stand of 100 base protein units can yield genetic differences more vast than the number of atoms in our galaxy. Yet, here we sit with common features and recognizable patterns. Still interesting I guess.
What's obvious to some seems impossible to others. So... This is mostly aimed at the people that can't imagine how a random event could ever result in anything meaningful happening.

Other than that, the 'test' of it being described here isn't very interesting, except perhaps as an illustration of genetic algorithms.

(A 9 character random sequence being compared to how close it is to fitting a specific pattern is mathematically close to how evolution functions, though if you keep repeating this in that manner it isn't quite random anymore.)
 
Feb 13, 2008
19,430
0
0
ryo02 said:
The_root_of_all_evil said:
ryo02 said:
who care anout shakespear thats allready been written we dont need it writing again by virtual monkies.
I think one of the monkeys has escaped.
I didnt mean I dont care about shakesspear I meant we allready have it its a good thing but it doesnt need writing again since shakespear allready did it the first time get it?.
You're missing the point. Shakespeare is only the benchmark. The chance of them re-creating the work is tiny...but if they can...they can also create work AS GOOD AS Shakespeare - without any of the skill - simply by millions of attempts.