h a l f b a k e r y
i v n i n seeks n e t o
add, search, annotate, link, view, overview, recent, by name, random
news, help, about, links, report a problem
or get an account
Please log in.
Before you can vote, you need to register.
Please log in or create an account.
and how far they've come writing the complete works of Shakespeare by hitting these random letters.
So you'd see a virtual monkey on the screen typing a few million letters a second (the hands, paws, whatever would just be a blur obviously) and at the bottom of the screen you'd see how far the digital
monkey has come writing the complete works of Shakespeare.
Once it's completed it, the screen resets and it starts over. So you might happen across the exhibit and see the little guy typing away and below the screen says:
"ACT I SCENE I. Elsinore. A platform before the castle. FRANCISCO at his post. Enter to him BERNARDO BERNARDO Who's there? FRANCISCO Nay, answer me: stand, and unfold yourself. BERNARDO Long live the kin [ ]
(the last box shows the various letters being "typed". When the correct letter, "G" is hit, it finishes the word "king" and moves to the next space.
Unlike the thought experiment, this wouldn't reset every time they misspelled something, it would just type random letters in one spot until it got it right.
This is a slightly more practical version of an old idea to use real monkeys.
There's probably somebody smarter than me out there that could pretty precisely predict how long it would take to do this. I'll give it a shot.
So for one sentence with say 100 letters, let's average it taking 13 tries, (the middle of 26) to get the right letter, 1 million letters a second, maybe 80,000 correct letters a second so 800 sentences a second? 118,406 lines in the complete works (yes, that's actually on the internet, you can look it up) so maybe 2 1/2 minutes for super monkey to, using random letters, type the complete works of Shakespeare.
That is probably so wildly off as to be embarrassing, but it would be a way to take the incredibly unfathomable concept of how fast modern computers are and make it somewhat tangible.
Just occurred to me by lines they probably don't mean sentences, they mean the line the character says, like "Yorick's dead, that sucks." so divide my estimate by about 5 or so. It'll still be wildly off but that's not the point.
Slightly less practical version.
But with real monkeys. [doctorremulac3, Jul 18 2021]
Much less practical version.
The infinate monkey theory. [doctorremulac3, Jul 18 2021]
[pocmloc, Jul 18 2021]
math.stackexchange.com: Binomial Distribution: Finding the number of trials given probability and successess
Some worked answers to the question: How long will it take? Here the posters come up with different approaches to answering what looks like quite a tricky question. It'd be relatively straightforward to substitute some decent estimates for the approaches given and come up with a maximum length of time that, 90% of the time you'd have to expect to wait before you got a finished block of text. [zen_tom, Jul 20 2021]
//The advantage of having it generate every permutation...//
Done done done baked overcooked extracted from oven scoffed had seconds done the washing up put the dishes away and then made a nice cup of tea afterwards [pocmloc, Jul 20 2021]
||It all depends on the mechanism and protocol used. And I also think that the random generator / monkey is kind of irrelevant, the important thing is the "selecter" who looks at the random output and selects what is useful or interesting.
||Basile's Library of Babel website tries to articulate things liek this but I think his problem is that his algorithm deliberately scrambles the outputs to make it look more random than it really is.
||Part of the fun of these things is the combinatorial explosion of big numbers, but we can keep things manageable by using smaller examples. Instead of waiting for the complete works, we wait for one line, and then extrapolate.
||Consider your example line, "Yorick's dead, that sucks." 27 keypresses for Monkey to type that.
||If we use e-monkey then it will start by typeing
|| A lot of the problem depends on defining your character set, I have not included accents, ligatures, numerals, or other punctuation, but that is arbitrary. it makes a difference to the calculations.
||So after a certain amount of time we get to
Yorick's dead, that suckR)
Yorick's dead, that suckR"
Yorick's dead, that suckR'
Yorick's dead, that suckR!
Yorick's dead, that sucksa
Yorick's dead, that sucksb
Yorick's dead, that sucksc
Yorick's dead, that sucksd
Yorick's dead, that suckse
Yorick's dead, that sucksf
Yorick's dead, that sucksg
Yorick's dead, that sucksh
Yorick's dead, that sucksi
Yorick's dead, that sucksj
Yorick's dead, that sucksk
Yorick's dead, that sucksl
Yorick's dead, that sucksm
Yorick's dead, that sucksn
Yorick's dead, that suckso
Yorick's dead, that sucksp
Yorick's dead, that sucksq
Yorick's dead, that sucksr
Yorick's dead, that suckss
Yorick's dead, that suckst
Yorick's dead, that sucksu
Yorick's dead, that sucksv
Yorick's dead, that sucksw
Yorick's dead, that sucksx
Yorick's dead, that sucksy
Yorick's dead, that sucksz
Yorick's dead, that sucks,
Yorick's dead, that sucks.
||at which point the selector shouts "stop!" and everyone parties like mad, cracks open champagne, does lines of cocaine, dances to exhaustion to loud music, kisses and possibly fornicates with the nearest sexy woman / man (delete as appropriate), and generally forgets why they were even there.
||Hmm, hadn't considered lower and upper case, that
everything. Punctuation too, yea, that's gonna keep that
||So the complete works, maybeeeeee... 10 minutes?
||Now this would be incredibly boring to watch because all
you'd see is thousands of words a minute blasting by the
screen so maybe there's be a zoom in (slow down)
function where you could watch what's actually
happening. Like a hold button or something that slows it
to readable speed to see something like Poc's very
impressive annotation rather than just a blur.
||Don't forget to factor in upper and lower case,
some italics and of course line spacing for the
sonnets and there are numerals as well. The
permutations are now beyond comprehension. Ask
||I don't know any of those. But I'm guessing if I contacted one
they'd be happy to have some human interaction.
||Okay that was mean. I'm sure they go out on Saturday nights
just like everybody else.
||//So you'd see a virtual monkey on the screen typing a
few million letters a second//
||I want to see the 20 million FPS video card.
||I answered a quora question about pi and when we
would get any sequence repeated. Got me thinking
and simplifying. In the decimal system i have ten
options of digits so by the eleventh there must be a
single recurrnce of one of those numbers. During the
10th digit its 9 out of 10 chances while at the
beginning its 1 out of ten. Averaging its 50 50 right?
For two-digit numbers ther are 100 possibilities
including 00. Averaging 50% 50% but after laying
down ummm. Lets see.
We can compress redundant numbers.
00 1 02 11 20 22 thats 11 out of 18 digits..
For all 10 digits thats 01020304... 09112131
18 1922324...29334...39445... 49556...667 6869
Every 10 numbers, I use 3 less digits so
10+9+8...+1 - .5*5 = 52.5
After writing 53 two digit numbers i get a recurrence
and by the 25th we are up to 50%.chance of gettin a
repeated two digit sequence. I could simplify that by
seeing all numbers as a 50% chance of repeating.
||With 3 digit there are 1000 numbers. Each with the
equivalent of 50% chance of being a repeated
number. After 520 numbers there must be a
||For four digits there are 10,000 numbers and after
5200 there must be a second one.repeated.
||The rule: after 52% of log the count of digits in each
number (or more simply: 1 followed by zero's the
length of the number) we must have a repeated
sequence of digits ie a recurring number.
||For sentences and words and letters there are
additional complexity bringing up the resulting
expected disrance until receiving a recurrnce.
||Including the space quotemarks parenthesis capital
and lowercase letters there ate many more symbols
than the 10 digits. Lets say around 60. So instead of
10 to the power of the number of characters in the
phrase it will be 60 to that power.
||Since its monkeys pounding randomly on the
keyboard chances of them writinng the word the
from the phrase the oxford dictionary are 60*60*60
which is one in 216000 not that bad but getting the
next word with the space would multiply the options
up to 60 to the power of 10! And the next word may
be chosen one out of 60^21.at 2 characters per
second, don't forget they are pounding on the
keyboard, Thats about 1^16 years for a million
monkeys. Enough years for monkeys to evolve into
intelligent beings through artificial selection and
understand what they wrote.
||The only problem is where do you find a million
monkeys in captivity that are not going extinct by
their owners with the assistance of PITA and how do
you cause them to continuously pound on the
keyboard? Unless you consider us and our
halfbakery activities as random pounding.
||//I want to see the 20 million FPS video card//
Well, there are femto-second pulse lasers, so in theory you
could build an array of those to create a (low-res) display;
sequencing properly would be the hard part. Probably needs
an optical computer processor...
||You can go to Basile's Library of Babel website and click on "random" as many times as you like to get a stream of random texts. My suggestion was that the random texts be sorted alphabetically, so that each text is surrounded by near identical texts differing only in the final few digits. My brief excerpts of a brief passage show how infuriating this could be.
||My question still stands though, the issue is not really the generation of the complete possibility-space of texts, but rather the identification and halting at the desired text.
||Basile's implementation does this in a kind of reverse way, in that if you paste the desired text into the search field, the algorithm processes it and returns the text that you put in. My sorted organisation does this much more idiotically than Basile's but that just shows that the entire concept is idiotic.
||The esteemed [Dr].'s proposal here seems to shrink the problem down to selecting or identifying the letter required rather than the passage. This makes it very simple to the point of unsatisfying at the implementation level.
||For example take our sample passage that we wish to "find": "Yorick's dead, that sucks."; we first want to find the character "Y". Let's go:
Y Got it!
||Now hold that character and search for the next character which is "o":
o Excellent. What's next...?
||Is this a fair summary of the proposed process?
||And if so, is this not basically how a daisy-wheel printer works?
||Yes, that's it. The other thing I guess would be to just
have random letters blasting along and when they hit in
sequence light them up.
||So only show something if it at random comes up with an
A, then an l, another a and an s for "Alas".
||You could then chose how picky you'd be. For instance,
you could use that to fine the word "the" and past it in
every occurance. This would be possibly a little more
interesting. Then I suppose you could have a graphic
showing the complete works of Shakespeare, say one red
dot for every work that turns green when it's been
randomly spelled. Then have a percentage at the top of
||That seems a lot more interesting.
||Another way would just have it be in sequence. So of a
play starts "Hey Yorick, what's up bro?" You'd see "Hey"
when random letters spelled "Hey", then move to Yorick,
and only pop up that when the scrolling randomly pulled
up a Y, o, r, i, c and k in sequence.
||Seems like at ever millions of trys a second that might
take quite a while. Be interesting though.
||This system relies on a "filter" that is ALREADY the works of
Shakespeare. What it really should do is randomly generate
every letter for the size of the work/s for each attempt, and
only stop if the whole thing fits.
||Here's a question, if you have it just write at random such
that each letter has to fall into place throughout the whole
works, isn't it the exact same chance that you'd compose
what would have been his next complete works just at
||[doctorremulac3], yes. Here's a broom. Some bits of your
mind went over there, under the desk ->
||Lets see. Hamlet is roughly 30,000 words. Average
length of words in English, 5 letters, although
perhaps Shakespeare used longer-than-average
words, so say 6. Plus one character (per word) for
a space/punctuation - roughly 200,000 characters.
Choices of character: 26 upper case, 26 lower
case, 10 for digits, 10 for punctuation.
||Thats 72^200000 permutations, too big for easy
||Just to get an order-of-magnitude idea of how
||Say theres 100 billion stars in our galaxy and each
one (on average) has a planet. So thats 10^11
planets. Say each planet has 100 billion monkeys
with typewriters. Thats 10^22 monkeys. Each
monkey lives 10 billion years, typing a billion
characters a year. Thats 10^41 characters in total.
Even if we take every galaxy in the visible universe
(roughly 100 billion), filled with typewriting
monkeys, for the entire age of the universe, they
might achieve the first 50 characters or so of
of course, if you base the reward function on
how close the output is to the original, and allow
the reward to be producing baby monkeys, you get
there much quicker. Its happened at least once in
the history of the universe already.
||[Frankx] its not the random generation that's interesting, its the selection.
||Your numbers give us every possible text. But we don't want every possible text, we want just one text: Hamlet.
||Its very similar to the lottery. The machine is not meant to produce every possible combination of six balls.It is only meant to produce the specific combination on your ticket. Whether it does or not is due to selection bias in the machine operator.
||Hmm, I want one of your lottery tickets.
||If your system is just randomly bashing through the
the right one pops up, it's trivially easy.
||72 x 200,000 = roughly 14 million.
||If the monkey types a million characters a second, it'll
in 14 seconds. To anyone watching, it'll just look like the
text of Hamlet being typed out.
||Right so then its a daisy wheel printer, or one of those flap number displays, each position in turn cycles through the repertory of characters until the required one appears at which point the "selector" stops the cycling.
||The lottery machine works by spewing out a sequence of balls, which are each in turn picked up off the floor and replaced in the top of the machine, until a ball with one of my numbers appears, in which case it is placed in the results tray. It doesn't take long for my numbers to be all in the results tray at which point I win meelions.
||Also I'd just like to point out that if it actually is monkeys pounding the keys of typewriters, there is going to be a distribution curve of the frequency of letters, e.g. I would expect to get more Hs, Gs, Js and Fs than Qs, As, or Ps. Also that capital letters require a double press (or shift lock) so there will be a lot more fs than Fs (though Shakespeare also uses more lower case letters than upper case). There will however be a lot more numbers than punctuation marks, and I would guess Shakespeare used more punctuation than numerals. We need a statistical analysis of monkey arm reach location preference, typewriter character distribution maps, and a statistical analysis of character use in Shakespeare's prose. Indeed, we also need to consider what edition we are aiming for. The First Folio, or the Quarto, or a modern edition such as Riverside or Everyman, or what?
||Perhaps different species of monkey have different neuro-motor preference for handedness and spatial orientation and reach, which would affect the expected distribution of typed characters.
||The advantage of having it generate every permutation is
that not only will you have Hamlet, and every other work
Shakespeare ever wrote, you'll also have all the works
that he never got around to writing.
And all the 200,000 character works of - Hemmingway,
Marx, Dickens, Tolstoy... the lyrics of every Beatles songs
(including the ones never written)... and the answers to
every question... the actual correct Unified Theory... the
perfect (and implementable) guide to solving all
Humanity's problems... a design and implementation
method for a superintelligent altruistic AI...
||Need to have multiple monkeys - so we can have a nice
realistic controversy over authorship claims
||How about betting on them? Now that's an idea.
||Monkey #6 leading the pack, he's halfway through
Othello and... HOLD ON! HERE'S MONKEY #4
BLASTING THROUGH ROMEO AND JULIET AND...
HE'S DONE HAMLET.... HE'S ROUNDING OUT WITH
KING LEAR AND OH MY GOD HE'S FINISHED A
MIDSUMMER NIGHT'S DREAM IN AN INCREDIBLE 15
SECONDS A NEW WORLD RECORD!! Ooops, don't get
too close folks, he's throwing shit at the crowd
through the bars of his cage. It's a stunningly
realistic robot but I think they could have left that
last feature out.
||Yes! I'm loving the image of multiple monkeys racing to
complete individual works.
||Does sort of give you a reason to watch doesn't it? Otherwise
it's just an animated monkey and a bunch of words popping
up on a screen.
||KNowing WHY those words are popping up as they are would
be the interesting part but throwing the competition aspect
in could be interesting.
||Hey, bet on a monkey! 10 bucks to play, winner gets the pot.
||Going the other way, I wonder how many 'bits' of
information are needed to be data networked to
create the monkey, that is Shakespeare.
||The calculation probably involves the number of brain
cells and their ability to store and transform the brains
own way of information bits. A whole lot of little
cellular protein typewriters.
||Hey, that gives me an idea, wonder if you could use an idea
like this to figure out how long it takes for life to evolve out
of inert matter? Take the raw elements of primordial ooze
and throw all the molecules of that stew into a simulation
and create virtual life.
||Somebody has to have thought of that right?
||Well, yes and no. The Miller-Urey experiments in
the 1950s tried to simulate a primordial
stew and tinker with it until they got amino acids.
But no monkeys or infinite
iterations were involved.
||That's mixing stuff in a blender and sticking a
strip in it. This would be identifying the
of the various molecules and creating a program to
simulate their interaction under various
circumstances until a virtual monkey pops up and
says "Hey doc, wanna see me ride a little bike
wearing a bellhop hat?"
||Where do I apply for my Nobel prize? I think there's
place on the other side of town that does payday
loans and Nobel prize applications.
||//creating a program...// I think that is what caused the Big Bang