Talk:Elbereth

From NetHackWiki
Revision as of 15:49, 26 September 2009 by Thefifthsetpin (talk | contribs) (Engraving Probability)
Jump to navigation Jump to search

After discussing at Talk:Scroll of mail and at r.g.r.n, I finally sent an email to the devteam. Pat Rankin replied very quickly that in his opinion it is a bug that any item needs to be placed on an E-square to activate it and that this behaviour is a leftover from the times the only way achieve the same effect was a scroll of scare monster lying on the ground. The function that scares monsters only checks squares which have something on them, not empty squares, so they get ignored. --ZeroOne 14:38, 9 September 2006 (UTC)

There is nothing here about the effect of inscribing elbereth with a magic marker. There needs to be. Magic marker elebereths almost appear to be permanent, but I don't have enough information to say for sure. I accessed this website to find out how long MM engravings last. Jack

Please note. When I inscribe elbereth with a MM giant ants do respect it. This page notes that no "A" monsters respect it, and lists giant ants in that category. jack, battling two giant ants with 10hp left

-I think that they only mean monsters represented by a capital A, but the "A" link links to both capital and lowercase. Kahran042

I may have figured out why. I prayed at the sight of my engraving and the ants respected it. Later while being relentlessly pursued through a hallway i engraved it with a MM and they did not respect it. Maybe prayer is the key here Jack

Magic marker Elbereth is equivalent to using a wand of digging or a non-cursed athame - it takes one turn, you never mess up the letters (unless under some bad status effect) and it lasts much longer than engraving in the dust but is not permenant. Prayer has nothing whatsoever to do with it. (A)ngels do not respect E but (a)nts do. EkiM 11:35, 7 March 2007 (UTC)


This whole page is a mess. I intend to rework it later. EkiM 11:40, 7 March 2007 (UTC)


I was so happy to see that this page had been designated the featured article for April, 2008, that I created a jpeg of the word "Elbereth" in three of Tolkien's scripts and added it to the top of the article. That should spiff it up a bit.--Ckbryant 22:24, 7 April 2008 (UTC)

Thanks, it looks really nice. I think this is a superb article too. --Andronikus 03:37, 8 April 2008 (UTC)

The Speed and Quality section could use further rationalisation. I think this article should focus more on only those details that are relevant to tactical use of Elbereth; I have moved out some of the discussion of slow engraving, and trimmed some of the other discussion a bit, but the section is still rather long in getting over the basic points. --User:cph

Not a goddess

In Tolkien's works Elbereth is not a goddess, but a sort of angelic being. Tolkien's universe has just one god (Iluvatar, who is actually the same as the Christian God). I have changed the article. Molinari 23:14, 25 April 2008 (UTC)

Engraving Probability

As a purely academic point, the probability of engraving Elbereth is slightly higher than (24/25)^8. Consider the following... I was getting swarmed by ants and my mirror wasn't cutting it, I bent down to try to engrave "Elbereth" with my fingers, the ants flee, I look down to read "elBereTh"... Woot! And no, I'm not a big enough nerd to find the actual probability (actually I am but I'd have to know how many characters the game allows you to engrave). DemonDoll 13:02, 5 June 2009 (UTC)

Since you can engrave 10 letters for free in one turn and be in safe haven that turn already if you succeed, you'd have to account for "ElberethEl" turning out as "23elbereth" or similar. Highly unlikely, yes, but possible. BTW, I'm a mathematician. -Tjr 13:58, 5 June 2009 (UTC)
And that is why I love this game. I'll have to have a look at the source code sometime...can you "mistakenly" engrave "E" instead of "E" as well? (I mean, does the game exclude the original letter from the possibilities once it determines you've made a typo...er, "engravo"?) I put the calculation in the article, and I am happy to stand corrected. --Ckbryant 15:34, 5 June 2009 (UTC)
I did the numbers, and the chance of "mis"-engraving E for E etc added up to half a percentage point. Word-boundary cases did not change the numerical result. -Tjr 12:28, 31 July 2009 (UTC)

I ran a monte-carlo simulation of engraving Elbereth for 8 turns, 100,000 times. I ran it once where you always engrave "Elbereth" and once where you look at what is engraved, then engrave the rest of Elbereth, then the start of the next Elbereth, and Engrave as far as you can get in 9 characters (the limit of instantaneous engraving). I'm not very good with wiki formatting, and I'm not sure how to best display the results. If you're someone who is good at presenting information, please present this strategy in the article. My results:

strategy:nieve (engrave "Elbereth")

           t:1   t:2   t:3   t:4   t:5   t:6   t:7   t:8  
 Els:0 => 27872  7699  2141   538   145    33     7     1 
 Els:1 => 72128 40181 16834  6260  2126   691   220    65 
 Els:2 =>     - 52120 43354 24112 11111  4640  1759   619 
 Els:3 =>     -     - 37671 42082 29298 16191  7830  3429 
 Els:4 =>     -     -     - 27008 37835 31723 20508 11466 
 Els:5 =>     -     -     -     - 19485 32806 32066 23632 
 Els:6 =>     -     -     -     -     - 13916 27612 30804 
 Els:7 =>     -     -     -     -     -     -  9998 22749 
 Els:8 =>     -     -     -     -     -     -     -  7235 

strategy:clever (engrave 9 characters, such as "rethElber"

           t:1   t:2   t:3   t:4   t:5   t:6   t:7   t:8  
 Els:0 => 27730  6833  1549   305    62     9     3     - 
 Els:1 => 72270 38755 13854  4062   971   219    40     9 
 Els:2 =>     - 54412 42383 19572  6911  1957   540   124 
 Els:3 =>     -     - 42214 42332 23646  9765  3197   933 
 Els:4 =>     -     -     - 33729 40814 26586 12427  4292 
 Els:5 =>     -     -     -     - 27596 38518 28393 13087 
 Els:6 =>     -     -     -     -     - 22946 36104 25640 
 Els:7 =>     -     -     -     -     -     - 19296 30910 
 Els:8 =>     -     -     -     -     -     -     - 19912 
 Els:9 =>     -     -     -     -     -     -     -  5093 

strategy:full-turn nieve (engrave "ElberethElbereth")

           t:2   t:3   t:4   t:5   t:6   t:7   t:8   t:9  
 Els:0 =>  7757   574    50     7     -     -     -     - 
 Els:1 => 40343  6278   686    75     8     -     -     - 
 Els:2 => 51900 24474  4696   647    88    10     1     - 
 Els:3 =>     - 41922 16366  3402   556    86     9     1 
 Els:4 =>     - 26752 31632 11447  2551   473    89     9 
 Els:5 =>     -     - 32752 23828  8219  1918   380    58 
 Els:6 =>     -     - 13818 30888 18023  6033  1487   312 
 Els:7 =>     -     -     - 22666 26597 13546  4393  1110 
 Els:8 =>     -     -     -  7040 25724 21859 10377  3320 
 Els:9 =>     -     -     -     - 14572 25735 17688  7978 
 Els:10=>     -     -     -     -  3662 19501 23249 14106 
 Els:11=>     -     -     -     -     -  8952 22127 20291 
 Els:12=>     -     -     -     -     -  1887 13868 22043 
 Els:13=>     -     -     -     -     -     -  5353 17665 
 Els:14=>     -     -     -     -     -     -   979  9475 
 Els:15=>     -     -     -     -     -     -     -  3152 
 Els:16=>     -     -     -     -     -     -     -   480 

strategy:full-turn clever (engrave 19 characters, such as "thElberethElberethE")

           t:2   t:3   t:4   t:5   t:6   t:7   t:8   t:9  
 Els:0 =>  7680   407    13     -     -     -     -     - 
 Els:1 => 40322  4955   212    17     -     -     -     - 
 Els:2 => 51998 21925  1619   138     9     -     -     - 
 Els:3 =>     - 42715  7490  1069    83     8     -     - 
 Els:4 =>     - 29998 20265  4417   564    50     7     1 
 Els:5 =>     -     - 32488 13043  2354   259    30     4 
 Els:6 =>     -     - 27962 25053  7617  1180   152    16 
 Els:7 =>     -     -  9951 30136 16973  3658   609    71 
 Els:8 =>     -     -     - 20152 26195  9219  2078   276 
 Els:9 =>     -     -     -  5975 26424 17452  5522  1062 
 Els:10=>     -     -     -     - 15593 23640 11656  2973 
 Els:11=>     -     -     -     -  4188 22718 18929  6651 
 Els:12=>     -     -     -     -     - 14907 22926 12517 
 Els:13=>     -     -     -     -     -  5879 20290 18249 
 Els:14=>     -     -     -     -     -  1030 12306 20944 
 Els:15=>     -     -     -     -     -     -  4657 18544 
 Els:16=>     -     -     -     -     -     -   838 11890 
 Els:17=>     -     -     -     -     -     -     -  5163 
 Els:18=>     -     -     -     -     -     -     -  1458 
 Els:19=>     -     -     -     -     -     -     -   181 

Thefifthsetpin 00:54, September 14, 2009 (UTC)

If the difference doesn't look substantial to you, notice that by turn 3 your chance of failing to engrave an E drops by about a quarter. By turn 4 it drops by half. I posit that 3-4 failed attempts to engrave an E have killed many adventurers.Thefifthsetpin 00:54, September 14, 2009 (UTC)
My numbers are optimistic -- I assume you don't rub out what you're standing on while you engrave on the next turn. Nethack isn't so nice. If anyone posts the odds for that part, I'd be happy to include that in my simulation.)Thefifthsetpin 00:54, September 14, 2009 (UTC)
From playing, I have the impression smudging the Elbereth you are standing on is indeed a problem. However, as you can engrave 19 letters on one turn, the smart way would be to engrave "ElberethElberethElb" and monitor if monsters hit you. (Fine print: If you successfully engrave Elbereth with 9 or less letters in one go, it protects you that turn. If you engrave 19 or less letters in one turn, you get protected the next turn.) In practise, I keep "ElberethElbereth" in the clipboard and engrave that. I'd like to see a simulation for the optimal 19-character case with smudging, and also for the copy-paste-"ElberethElbereth" approach. Could you please add that? -Tjr 16:39, September 14, 2009 (UTC)
Update: my previous analytic computation of engraving success probability should be accurate for the 8-letter case without smudging, and correcting for word boundaries within each turn's engraving only has a negligible effect (less than 0.1%). So what your simulation could improve is the smudging part and the effects of "berethElbe". -Tjr 16:45, September 14, 2009 (UTC)
Smudging is indeed a problem if you're fighting. Engraving, however, is nearly nonabrasive, so smudging should have a quite minor effect. As I said before, if someone explains the smudging rules to me, then I'll include them in the sim. I'd like to, in fact. Thefifthsetpin 20:52, September 18, 2009 (UTC)
Engraving "ElberethElbereth" or "ElberethElberethElb" is an interesting idea. I've uploaded those stats as you requested (still no smudging). Bear in mind that fast or very fast characters can get many actions to the turn, which becomes an advantage for those using instantaneous engraving. Regardless of character speed, your chances of getting hit several turns in a row drop considerably when engraving 19 characters, but the damage you take in the first (and possibly second) turn means that you still take more damage overall, assuming you get hit for the same amount in every turn during which you get hit. Of course, getting hit more overall is often a good trade for not getting hit 4 turns in a row.... 20:52, September 18, 2009 (UTC)
1) I researched the smudging, and while I'm at it, wrote this smuding mini-spoiler:
Firstly, the letter "B" can be smudged to "b", this is only relevant for "ElBereth". See Engrave.c#wipeout_text for probability details.
Other than obscure cases (engravement before you finish your turn, printing on burnt t-shirts, appearance of scrolls after unsuccessful magic marker writes,...), all smudging is done via Engrave.c#wipe_engr_at. It converts the given number (pseudo-number) of letters to smudge to 0 or 1 (number) if the engraving isn't in the dust or in blood, else "pseudonumber" == "number". Next, it calls Engrave.c#wipeout_text with no random number seed, the effect is Engrave.c#wipeout_text will chose "number" times an equally-distributed, random position in the engraving and alter the letter. The same position can be picked several times, even if it is a blank at the end. Finally, Engrave.c#wipe_engr_at will delete the engraving if only blank space is left. I am not sure how throughoutly eroded engravings get shorter: I have never observed one beginning with a blank space character. It might be a goot idea to read the source for wipe_engr_at and the functions it calls because matters are a bit complicated.
Places that call Engrave.c#wipe_engr_at are: moving monsters wipe pseudo-one letter per turn or per monster movement, stone to flesh and force bolt (cast down) wipe pseudo-2d4 letters, and Source:Engrave.c#u_wipe_engr for all smuding the hero does himself, but only if you can reach the floor (including if you are flying as a vampire, but not levitating ...).
Places that call Source:Engrave.c#u_wipe_engr are: Source:Allmain.c#line265 There is a 1-in-(40+3*dex) (+1?) chance you will wipe pseudo-rnd(3) characters at your spot each turn (not per-movement); Source:Uhitm.c#line381 you wipe pseudo-three letters per melee attack; Source:Dig.c#line989 unsuccessful dig attempts wipe pseudo-three letters; Source:Dothrow.c#line94,Source:Dokick.c#line729 kicking or throwing wipes pseudo-2 letters; Source:Hack.c#line876 domove() wipes pseudo-rnd(5) letters, once per player movement (I'm not sure if this includes waiting with ".").
The logic "wipe 3 random letters" explains why it is better to fight on a long string of Elbereths, even if the beginning of the string has long been eroded.
2) Sorry to nit-pick your tables again: I think you let the simulation engrave Elbereth n times, that is a pre-determined number, and then counted the instances with correct spelling. In practise, a player would engrave until there was one correctly spelled Elbereth on the floor. So what's interesting is the probability distribution of the stopping time "number of engraving attempts until there is a correctly spelled Elbereth on the floor". In the "smart" case, this includes re-starting with "ElberethElberethElb" if you mis-spelled the ending, e.g. "...ElRe".
3) Getting hit more often but less hard is a good thing: it lets you take better advantage of your innate healing than the same amount of damage in one chunk. -Tjr 10:32, September 19, 2009 (UTC)
Wow. Thanks, Tjr. Firstly, I'll address point 2) because it's simple. The "smart" case would not engrave "ElberethElberethElb" if your engraving ended "...ElRe" It would engrave "lberethElberethElbE". The fact that there are 3 'e's in Elbereth is helpful, and is in fact why I felt like running this simulation. Also, notice that the first row of each table contains the statistics which you are interested in. I concede that the later rows are less useful.
Also, thanks for noticing the B => b. I looked at that table for calculating mis-engraves, but I must have been too focused on seeking letters that become 'E' or 'e'.
Regarding 3), I quite agree that getting hit more often and less hard bing a good thing. As I said in my first comment, the main danger in relying on Elbereth comes from when engraving repeatedly fails, not from when it fails during your first few attempts.
On to smudging. Since we're discussing engraving actions and turns only, I'll recalculate using the "1-in-(40+3*dex) (+1?) chance you will wipe pseudo-rnd(3) characters at your spot each turn." bit from your spoiler. I should be able to get to that this weekend. For dex, I'll probably just hardcode a 14. Seems like an easily attainable dex for early or mid game. Sound good?
I need to just get magicbane and stop worrying about these things. ;) Thefifthsetpin 15:49, September 26, 2009 (UTC)

How to paste

Somebody asked this with an "inline question". Just so it doesn't get lost: You paste into Nethack with the usual means of your operating system. For example, in OS X, you paste using apple-v into the popup opened by the tiles port, or using apple-v into the terminal window you telnetted to NAO with. Tjr 13:45, 19 August 2009 (UTC)