[Monkey more likely to write Hamlet or ascend?]
Assuming our monkey hits keys on a standard US/UK 101-key keyboard at
random, then the important variable is the length of the input string
required to produce the desired output.
Hamlet is a string of approximately 174,000 characters; an average
ascension takes perhaps 75,000 turns; although since for a considerable
period of time the player may well be very fast and unburdened, and a
considerable number of keystrokes will be dedicated to inventory management
and other activites which do not require a turn, perhaps an ascended
character would be a string of 120,000 characters.
This suggests that Hamlet is somewhat more improbable than a normal game;
an extinctionist, by virtue of playing rather longer, could well be a more
improbable output from a monkey than even a flawless copy of the tragedy of
the Prince of Denmark.
--
Stuart "not procrastinating at all" Fraser
But the probability of a monkey typing a . can be taken to be
significantly higher than typing a > -- to type a > requires two
near-simultaneous keypresses of SHIFT and . while typing a . only requires
one keypress. If we assume the monkey presses the shift key with a low
probability -- say, one chance in 10 -- then a standard game of Nethack
becomes much more difficult than an equal length character string with
fewer shift keys, due to the significant number of times shift-keys need
to be pressed (#, >, *, ?, etc.) If, however, we assume the shift key is
pressed with 50% probability (that is, all characters are equally likely
to be typed), this objection is moot.
But then, there is only one possible character string to produce Hamlet
(discounting the backspace key for the moment.) On the other hand, there
are many possible character strings that would result in an ascension --
for example, a wand of cancellation need not be named NOT IN BAG, it could
just as easily be named FAT MONKEY without changing the final outcome of
the game. Also, typing n20. or typing 20 .'s in a row would have the same
result (barring interruption by a hostile monster) so the character sting
need not even be of a fixed length.
When you consider the thousands of ascensions we have made, and if you
assume they all involved different keystroke combinations, this would make
ascending a Nethack character far more likely than typing Hamlet.
Must the monkey write Hamlet in English?
With an English keyboard? Hmm... it seems like there should be one
language out there that doesn't use accents, but my brain is failing
me. Maybe someone else can enlighten me while I try to get my unicorn
horn to work.
--
-Aaron Davidson
Hey, wait, is this thing cursed? Oh, wow! Everything looks so cosmic!
I believe a perfect copy of Hamlet requires capital letters. As there should
be more sentence initiations in Hamlet than times where it is required to use
#, >, *, ?, the point should be moot as well.
>[snip other good arguments]
--
ZNode
There are a significant number of capital letters in Nethack, as well --
at least if you want to [W]ear armor, [Z]ap a spell, [E]ngrave, [Q]uiver
any ammunition, [T]ake anything off, use half of your inventory, etc. I
specifically ignored these by assuming the Caps Lock key could be pressed
in sequence, either for Hamlet or for Nethack. The Caps Lock key,
however, does not create # > * ? etc. (Then again, Hamlet is sure to have
some " which also require shift, so perhaps the point *is* moot.)
> But then, there is only one possible character string to produce Hamlet
> (discounting the backspace key for the moment.) On the other hand, there
> are many possible character strings that would result in an ascension --
> for example, a wand of cancellation need not be named NOT IN BAG, it could
> just as easily be named FAT MONKEY without changing the final outcome of
> the game. Also, typing n20. or typing 20 .'s in a row would have the same
> result (barring interruption by a hostile monster) so the character sting
> need not even be of a fixed length.
I went over this again and I believe the backspace that you dismissed is a
counterargument. As I see it (from a stringwise perspective),
the senario of naming a bag NOT IN BAG or FAT MONKEY is the same difference
between typing, say
"but let your owa^Hn discretion"
and say,
"but hjkh^Hj^H^Hja^H^H^Hfj^H^H^H let your own discretii^Hon"
--
ZNode
I can't believe I missed Caps Lock...
But as hindsight (and to make less embarrasing situation as the main goal :P),
I believe ", ?, :, and ! in Hamlet would be enough to account for #, >, *,
?, and such in NetHack. Further, I believe the probability of pressing Shift
and $letter at the same time is no lower than Caps Lock, $letter, and Caps
Lock again.
--
ZNode
> [ much snippage ]
> > There are a significant number of capital letters in Nethack, as
well --
> > at least if you want to [W]ear armor, [Z]ap a spell, [E]ngrave,
[Q]uiver
> > any ammunition, [T]ake anything off, use half of your inventory, etc.
I
> > specifically ignored these by assuming the Caps Lock key could be
pressed
> > in sequence, either for Hamlet or for Nethack. The Caps Lock key,
> > however, does not create # > * ? etc. (Then again, Hamlet is sure to
have
> > some " which also require shift, so perhaps the point *is* moot.)
>
> I can't believe I missed Caps Lock...
> But as hindsight (and to make less embarrasing situation as the main
goal :P),
> I believe ", ?, :, and ! in Hamlet would be enough to account for #, >,
*,
> ?, and such in NetHack. Further, I believe the probability of pressing
Shift
> and $letter at the same time is no lower than Caps Lock, $letter, and
Caps
> Lock again.
This greatly depends on the timing between keystrokes, and the average
length of having a key held down. If the average "time between
keystrokes" is significantly longer than the average "time held down" then
holding down shift and the key is very unlikely, while hitting caps lock -
key - caps lock is not nearly as unlikely.
But still, I believe an average Nethack game will require a fairly high
number of # presses -- few for a fast game, many for an extinctionist
(#offer, #pray) but on average at least a few hundred. < and > for each
staircase, that's a hundred right there, and probably a good number more
since most characters go up and down more than once per level. And I
don't believe Hamlet uses quotation marks very often (in its original
form.) Then again, you may be right about : as I seem to remember it
being the delimiter after a character's name.
I think overall the special characters may turn out to be a wash...
however, Nethack still uses a lot more capital letters on average, which
would make the character string a lot longer (lots of caps-lock presses.)
Heh. My post is nested deep down the second major branching of "Negative
Reviewers - Cursed" as <ysgua.10014$1K5.6...@news3.news.adelphia.net>.
Indeed hard to find. Apologies.
>[Monkey more likely to write Hamlet or ascend?]
>
>Assuming our monkey hits keys on a standard US/UK 101-key keyboard at
>random, then the important variable is the length of the input string
>required to produce the desired output.
That would indeed be, but I was considering deletion characters. This would be
dependent to platform, but assuming DOS EDIT with everything removed but
accepting input, there would still be at least two keys - backspace and
delete - or three if Num Lock was off. Tapping "insert" and moving back the
document would undo a sizable amount as well. Of course, these keys would
also make no progress in a NetHack session, but would not make complete
reverse progress either.
Now if it was within VI, "d182d" would mean a lot more on the Hamlet side
than dropping 182 meatballs.
>Hamlet is a string of approximately 174,000 characters; an average
>ascension takes perhaps 75,000 turns; although since for a considerable
>period of time the player may well be very fast and unburdened, and a
>considerable number of keystrokes will be dedicated to inventory management
>and other activites which do not require a turn, perhaps an ascended
>character would be a string of 120,000 characters.
Finding approximate letter count of Hamlet was also my problem. Thank you
:). Better brush up my Google skills...
>This suggests that Hamlet is somewhat more improbable than a normal game;
>an extinctionist, by virtue of playing rather longer, could well be a more
>improbable output from a monkey than even a flawless copy of the tragedy of
>the Prince of Denmark.
And I'm still trying to see Medusa (well maybe not literally :)).
--
ZNode
No, (actually I'm suprised that) : is not a delimiter. However,
Shakespeare writes with a lot of it, i.e.
"Take up the bodies: such a sight as this"
[zenith@localhost]~> cat hamlet* | grep "?" | wc
399 2630 18629
[zenith@localhost]~> cat hamlet* | grep "!" | wc
267 1793 12722
[zenith@localhost]~> cat hamlet* | grep ":" | wc
538 4574 28210
Each of the little html pages has two links, so disregarding that 2 http":"//
per page this would result in 399+267+538-2(20)= 1164. That's at least a
thousand shifts.
LOL, what am I doing anyway? I know NetHack has a higher probability because
no negative progress can be done in NetHack as opposed to Backspaces in a
text editor. Must be the caffeine...
--
ZNode
Various points that occur to me:
1) Hamlet is a fixed string of characters. There is no guarantee that
a given string of characters (or key-inputs) that ascend a character
in one game will ascend a character in another game, indeed such a
string almost certainly will not. This is due to NetHack's random
nature.
2) It seems extremely unfair to disqualify a given string of
characters from being Hamlet unless it is word-perfect. A single tpyo,
or even sevral, stil renders the tecxt readable [yes, those were all
intentional :-)] On the other hand, a single typo in NetHack could be
harmless, or YASD.
3) Assuming our monkey can input "<" and ">" characters, we get
another problem. Random walks will return to their starting point, so
it's likely that the monkey is going to go < on the DL1 up-stairs at
some point. And it's extremely unlikely the monkey could escape
Gehennom with the Amulet. Given that the monkey will be going up and
down with equal probability, the monkey will on average be going
downwards.
4) If the monkey types # characters, it could #quit. The probability
of it quitting approaches certainty as the number of keystrokes
increases. Not very productive.
5) The backspace question is irrelevant. The probability of a given
string of a given length being produced is the same whether or not
backspacing is allowed, since the relative probabilities of characters
in that string will be the same.
The probability of producing a character string equivalent to Hamlet
can be calculated. (Or estimated, depending on your criteria regarding
typos, etc.) The probability of producing a character string
equivalent to a NetHack ascension cannot, as I see it, be calculated,
or even estimated. (see point 1) I can verify that a character string
is or is not Hamlet (to be or not to be) by reading it. I can't verify
whether a character string will be an ascension, unless I have the
exact random seed.
Given all this, I would say that producing a NetHack ascension would
be easier than producing Hamlet, if we assume the monkey can make use
of the shift-key, and we can disable the quit function.
[sig]
> Stuart "not procrastinating at all" Fraser
David "I'll procrastinate later" Corbett
That doesn't pertain to this, though; what we need to think about is, when
starting a game, what proportion of input strings will result in ascension.
[An assumption here is that a start state includes a starting state of the
RNG which does not consume external randomness during the game. I expect
that one can show that the odds of the monkey winning are the same whether
or not that is true, but it would be a more challenging exercise.]
I think it's easy to see that that is a _far_ greater proportion of the
total space than produce Hamlet. Hamlet is a work of roughly 200,000
characters, and hence only one (or a few, if you admit of typos) 200,000
keystroke sequences produce it - so the odds are roughly 1 in 70^200000
(70 is 62 alphanumerics plus about 8 punctuation marks - we're being kind
and giving the monkey a keyboard that can't type characters that aren't in
Hamlet.)
However, I believe that for practically any NetHack starting position an
ascension is perfectly possible in 60,000 turns or fewer - it might
require uncannily lucky guesswork, but that's OK, because at least one
of the possible input strings always _does_ make that uncannily lucky
guesswork. For instance, at least one of the possible input strings always
uses unidentified objects in the way that a highly skilled human player
would if they knew all the object identities.
Now that's a blatant assertion; but I think any experienced player who
considers it will know that it's true, especially if you assume the most
phenomenal luck - not RNG-luck, but this uncanny guesswork. There's
input strings that appear to magically know object IDs; there's input
strings that appear to know where every trap is and just happen to walk
around them; there's input strings that just happen to make ranged attacks
at undetected nasties charging down corridors at them; there's input
strings that never let the gnome zap a wand of death at them simply
because they just so happen to never line up with it - and there's input
strings that do _all those things_. With that kind of fortune, you might
think 60,000's an overestimate.
Now for nearly every starting position there's a shortest ascension
possible (the exception is games where the character literally is doomed
no matter what you do) - there might be more than one ascension possible
in that number of moves, but I'm not going to worry about that. I assert
above that that is fewer than 60,000, and so the odds of hitting on that
shortest ascension are no worse than 1 in 80^60,000 (80 because more
characters are legal input to NetHack); and 80^60,000 is _much much less_
than 70^200,000, which is why the various handwaves like the doomed starts
don't really matter.
When I say much less I really mean much less - that 60,000 move ascension
is something like 10^250,000 times more likely from random input than the
200,000 keystroke Hamlet is. And that's just the chance of one particular
set of keystrokes that lead to ascension, when evidently there are a very
great number of them.
>2) It seems extremely unfair to disqualify a given string of
>characters from being Hamlet unless it is word-perfect.
That's the traditional challenge for the monkey with the typewriter.
>3) Assuming our monkey can input "<" and ">" characters, we get
>another problem. Random walks will return to their starting point, so
>it's likely that the monkey is going to go < on the DL1 up-stairs at
>some point.
This is not meaningful - we know that only a tiny proportion of input
strings will be successful. This is just a manifestation of that effect.
>4) If the monkey types # characters, it could #quit.
This is another manifestation of that effect.
>5) The backspace question is irrelevant. The probability of a given
>string of a given length being produced is the same whether or not
>backspacing is allowed, since the relative probabilities of characters
>in that string will be the same.
This is ingenious but potentially wrong. First of all, it's not clear when
a backspace-enabled monkey stops. Is it the case that;
As soon as we have the number of characters in Hamlet typed, we stop the
monkey and look to see if we have Hamlet. In this case, your dismissal of
backspace is entirely accurate.
We allow the backspace-monkey to type indefinitely, but whenever it has
the number of characters in Hamlet, we check to see if we have Hamlet.
In this case the odds are slightly better than the non-backspace monkey,
because in a small proportion of the possible input strings, the monkey
initially has an erroneous Hamlet-size document but subsequently erases
the errors and produces a good one.
We allow the backspace-monkey (or even a non-backspace monkey) to type
indefinitely, and constantly examine the last Hamlet-size chunk of output
to see if it is Hamlet. In the first two cases, there is a finite (and
almost equal to unity) chance that the monkey will never produce Hamlet,
so we were presumably considering the chance that the monkey will produce
Hamlet compared to the chance that one run of the "NetHack Monkey" will
win NetHack. But here, the monkey _will_ eventually produce Hamlet, and so
the comparison is presumably between this one monkey run and a NH monkey
playing consecutive games of NetHack, and asking ourselves who needs fewer
keystrokes. This is easier for the monkey, because Hamlet can be fitted
into its output in any number of positions (what I mean is that typing any
character and then all of Hamlet fails cases 1 and 2, but passes here),
but not enough easier. However, here the non-backspace monkey is _better_
off, because nearly all the time typing character a, backspacing, and
typing character b is equivalent to just typing character b, but wastes 2
keystrokes. (Why "nearly"? What if you've got all of Hamlet but one
character, and character a is the right one to finish with? This extends
neatly to multiple backspaces.)
--
David Damerell <dame...@chiark.greenend.org.uk> Kill the tomato!
>ZNode <zen...@rootNOSPAMshell.be> writes:
>> [zenith@localhost]~> cat hamlet* | grep "?" | wc
>> 399 2630 18629
>Useless use of cat.
>grep "?" hamlet* | wc
Useless use of wc.
grep -c "?" hamlet*
Dermot
--
whathaveibecome? mysweetestfriend everyoneiknow goesawayintheend
youcouldhaveitall myempireofdirt iwillletyoudown iwillmakeyouhurt
ificouldstartagain amillionmilesaway iwouldkeepmyself iwouldfindaway
[snip]
What about all the multi line messages that require space or return to
proceed? A monkey might spend considerable time banging on other keys while
the game waits at --more-- prompt.
I think it's less likely to ascend that to write Hamlet.
Of course, none of these tell you how many '?'s there are in the text,
only how many lines one or more appears on.
How about this?
$ cat hamlet* | tr -dc '?' | wc
--
++acr@,ka"
not useless, it also gives word count. :p
iain
--
wh33, y1p33 3tc.
"If sharing a thing in no way diminishes it, it is not rightly owned if it is
not shared." -St. Augustine
Depends on the OS we have the monkeys use. The (example) Windows
window port only gives you -More- for big chunks of prompts, while the
DOS version -more's- every line.
And yes, I know Microsoft owns my ass.
--
-Aaron Davidson
Latest attempt at greatness failed miserably:
8 20870 Yoshi VI-Val-Hum-Fem-Law died in Sokoban on level 3
[max 8]. Killed by a soldier ant. - [82]
That doesn't hurt it at all if we're counting "chance to ascend at all on
one attempt".
--
David Damerell <dame...@chiark.greenend.org.uk> Distortion Field!
>> Useless use of cat.
> Useless use of wc.
Now how can a use be useless?
Sounds like a contraditio in terminis to me...
--
Boudewijn Waijers (bwaijers at tiscali.nl).
There are 10 types of people in the world:
those who understand binary, and those who don't.
> Hamlet is a work of roughly 200,000 characters, and hence only one
> (or a few, if you admit of typos) 200,000 keystroke sequences produce
> it - so the odds are roughly 1 in 70^200000 (70 is 62 alphanumerics
> plus about 8 punctuation marks - we're being kind and giving the
> monkey a keyboard that can't type characters that aren't in Hamlet.)
>
> Now for nearly every starting position there's a shortest ascension
> possible (the exception is games where the character literally is
> doomed no matter what you do) - there might be more than one
> ascension possible in that number of moves, but I'm not going to
> worry about that. I assert above that that is fewer than 60,000, and
> so the odds of hitting on that shortest ascension are no worse than 1
> in 80^60,000 (80 because more characters are legal input to NetHack);
> and 80^60,000 is _much much less_ than 70^200,000, which is why the
> various handwaves like the doomed starts don't really matter.
>
And in that one possible ascension, there are no superfluous keystrokes,
so the talk of getting stuck at -more- prompts (for instance) is
irrelevant.
> When I say much less I really mean much less - that 60,000 move
> ascension is something like 10^250,000 times more likely from random
> input than the 200,000 keystroke Hamlet is. And that's just the
> chance of one particular set of keystrokes that lead to ascension,
> when evidently there are a very great number of them.
>
You're right, and I rather missed the point. There's plenty of empirical
evidence to suggest that most games can (in theory) be ascended in under
60,000 moves (or keystrokes). And the chances of inputting that 60,000
move ascension are much better than inputting 170,000 (or whatever)
characters of Hamlet. With plenty of room to spare for (randomly)
posting YAAP to rgrn. :-)
Even if we fudge the numbers a bit, the ascension should come in well
ahead of Hamlet. Let's push things further in Hamlet's favour: say the
monkey only need use 34 characters (26 letters, plus punctuation),
170,000 keystrokes used, and say the ascension requires 100,000
keystrokes (after accounting for doomed starts):
170000 * log 34 = 260351
100000 * log 80 = 190308 (logarithms to base 10)
That is, the ascension is at least 10^70000 times more likely, even in
these conditions.
Even if we allow the monkey to make, say 10% typos in Hamlet, it will
still be way behind the ascension.
What if the monkey types Sy? can it start nethack again? And typing
the same name again... that will be hard.
I wish I'd noticed that. Good point.
--
David Damerell <dame...@chiark.greenend.org.uk> flcl?
I don't think of saving as a NetHack input operation, to be honest -
otherwise we get into insanity with the monkey at a general-purpose
computer trying to start NetHack.
Similarly, the Hamlet monkey is equipped with an infinite box of tractor
paper, and doesn't tear the paper feed, eat the paper, eat the typewriter,
etc.
>I can't believe I missed Caps Lock...
I don't miss it at all :)
hawk, who always disables it, physically if necessary.
--
Richard E. Hawkins, Asst. Prof. of Economics /"\ ASCII ribbon campaign
doc...@psu.edu Smeal 178 (814) 375-4700 \ / against HTML mail
These opinions will not be those of X and postings.
Penn State until it pays my retainer. / \
http://news.bbc.co.uk/1/3013959.stm
Spookily enough, somebody put a computer in with a group of 6 monkeys
and observed the result.
" The six monkeys - Elmo, Gum, Heather, Holly, Mistletoe and Rowan -
produced five pages of text which consisted mainly of the letter "s".
"
If only the researchers knew about nethack! The monkeys were
searching!
Si
<a number of arguments>
Shortening all these even further:
1) Hamlet is a string of length approximately 175k.
2) There are multiple strings of less than 60k that will ascend from
almost all nethack starting states.
3) *each* of those strings has higher probability than Hamlet.
4) Ascension is more likely than Hamlet.
hawk
>>What if the monkey types Sy? can it start nethack again? And typing
>>the same name again... that will be hard.
>I don't think of saving as a NetHack input operation, to be honest -
>otherwise we get into insanity with the monkey at a general-purpose
>computer trying to start NetHack.
Even if you treat it as death, the proof still holds . .
>Similarly, the Hamlet monkey is equipped with an infinite box of tractor
>paper, and doesn't tear the paper feed, eat the paper, eat the typewriter,
>etc.
Eat the dentist called after trying to eat the typewriter . . .
>> What about all the multi line messages that require space or return
>> to proceed? A monkey might spend considerable time banging on
>> other keys while the game waits at --more-- prompt.
>Depends on the OS we have the monkeys use. The (example) Windows
>window port only gives you -More- for big chunks of prompts, while the
>DOS version -more's- every line.
Hey, if you're using windows, crashing also has to be taken into
consideration here :)
>And yes, I know Microsoft owns my ass.
Brother, there is hope yet that you may be saved . . .
Of course, one thing that is curiously neglected from these discussions
is that we're talking about Shakespeare. Correct spelling is optional.
(Admittedly, an ascension is probably still more likely.)
--
++acr@,ka"
Well, it does:
<http://story.news.yahoo.com/news?tmpl=story&u=/ap/20030509/ap_on_fe_st/britain_monkey_authors_3>
(long link, may need re-assemblage)
:-)
--
Ole Andersen, Copenhagen, Denmark * http://palnatoke.net
Kindness is in our power, even when fondness is not.
- Samuel Johnson, lexicographer (1709-1784)
>Of course, one thing that is curiously neglected from these discussions
>is that we're talking about Shakespeare. Correct spelling is optional.
I think I need new glasses; I don't see which you're referring to . . .
>(Admittedly, an ascension is probably still more likely.)
Than a typo-free post?
hawk, ending his sentences prepositions with
Dr. Richard E. Hawkins wrote:
> In article <slrnbbo6s...@localhost.loopback>,
> Sam Dennis <s...@malfunction.screaming.net> wrote:
>
>>Dr. Richard E. Hawkins wrote:
>>
>>>[monkeys playing nethack]
>>>1) Hamlet is a string of length approximately 175k.
>>>2) There are multiple strings of less than 60k that will ascend from
>>> almost all nethack starting states.
>>>3) *each* of those strings has higher probability than Hamlet.
>>>4) Ascension is more likely than Hamlet.
>>
>
>>Of course, one thing that is curiously neglected from these discussions
>>is that we're talking about Shakespeare. Correct spelling is optional.
>
>
> I think I need new glasses; I don't see which you're referring to . . .
>
I think the point is that Shakespear had more than one way of spelling
some words (including his own name), so there would be more than one
"correct" way of typing Hamlet. But as I already noted, even if you
allow for very many typos (so you need, say, only 150k correct letters)
it's *still* far more probable to get an ascension than typing Hamlet.
>>>Of course, one thing that is curiously neglected from these discussions
>>>is that we're talking about Shakespeare. Correct spelling is optional.
>> I think I need new glasses; I don't see which you're referring to . . .
>I think the point is that Shakespear had more than one way of spelling
>some words (including his own name), so there would be more than one
>"correct" way of typing Hamlet. But as I already noted, even if you
>allow for very many typos (so you need, say, only 150k correct letters)
>it's *still* far more probable to get an ascension than typing Hamlet.
Ahh, perhaps I'm more awake today. Yes, this makes sense.
And there are also minor variations between existing copies of some of
the plays (a few extra and changed lines here and there).
hawk
I would give good money to be allowed to track down every arts type who
has taken some tiny piece of science, fundamentally misunderstood it, done
something utterly bogus; and administer atomic spinning wedgies until they
promise not to do it again.
With any luck this joker will try the cat in the box next and be severely
lacerated by an enraged mog.
That depends if the monkey is playing one game (what is the chance of
ascension?) or playing games over and over until it ascends (where we need
to stipulate that if it saves the game is immediately reloaded just as
when it dies a fresh game is started - saving and loading the game is not
a null operation for the gameplay.)
No; if the game can be reloaded, it just makes the ascend:hamlet ration
even higher, by adding even more ascension strings.