Virtual Typewriter Monkeys Pen Complete Works of Shakespeare (Almost)

Virtual Typewriter Monkeys Pen Complete Works of Shakespeare (Almost)

image

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

Permalink

The title alone immediately made me think of

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?.

Thinking that these results are still legitimate if they have a nine character veracity check is just bananas.

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.

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.

The only problem is that this experiment is pointless!!!!

No really, it's pointless. This experiment can be taken two ways; to see if a million monkeys can produce Shakespeare or to see if randomly assembled characters of infinite length will at some point produce Shakespeare.

The second definition is so obviously true that it doesn't need proof; an infinite string of characters will at some point contain every possible permutation of characters, no matter how unlikely, because it is infinite.

The first definition is pointless because monkeys don't behave like a randomiser program, they repeatedly press one key rather than pressing a random combination.

This is literally pointless, it literally proves nothing!

ryo02:
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:
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.

Kwil:

Braedan:
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.

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.

Baresark:
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.

toomuchnothing:
The title alone immediately made me think of

Of course the underlying joke is funnier than the "blurst of times" joke.

ryo02:
who care anout shakespear thats allready been written we dont need it writing again by virtual monkies.

image

I think one of the monkeys has escaped.

The_root_of_all_evil:

ryo02:
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?.

CrystalShadow:

Baresark:
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.

The_root_of_all_evil:

ryo02:
who care anout shakespear thats allready been written we dont need it writing again by virtual monkies.

image

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)

Huh. So can we add this to the ever-growing list of improbable things that happened before episode 3 was released? o:

Baresark:

CrystalShadow:

Baresark:
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.)

ryo02:

The_root_of_all_evil:

ryo02:
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.

The_root_of_all_evil:

ryo02:

The_root_of_all_evil:

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.

did I not mention the potential for original works in my first post? and that looking for those should be the whole point?.

ryo02:

The_root_of_all_evil:

ryo02:

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.

did I not mention the potential for original works in my first post? and that looking for those should be the whole point?.

But they don't know if it's possible. That's why setting a benchmark (the Works of Shakespeare) is important - because it's much easier to search for that than read through every word ever created looking for "something good".

 

Reply to Thread

Log in or Register to Comment
Have an account? Login below:
With Facebook:Login With Facebook
or
Username:  
Password:  
  
Not registered? To sign up for an account with The Escapist:
Register With Facebook
Register With Facebook
or
Register for a free account here