Thanks :)
After spending a week away, I see that nothing much has
changed.... How many times does this false notion have to be
dispelled? The conclusion is right, but the logic leading up
to it is wrong.
There is no preselected level where nethack "would have
created the portal". For each vault created within the eligible
range of levels, if the portal doesn't exist yet there's a 1/3
chance that it will be placed there. (The behavior is different
in wizard mode, where the first eligible vault always gets the
portal.) If all vaults fail the 1/3 check--or in the unlikely
event that there are no vaults within the range of levels--then
there will be no entrance portal for Ft.Ludios.
I'll also note that the 'eligible range' is between level 11 and
Medusa, the depth of the Oracle being irrelevant here; and vaults on
the Quest portal level aren't eligible to be given the Ludios portal.
--
: Dylan O'Donnell http://www.spod-central.org/~psmith/ :
: "Peek-a-boo, I can't see you, everything must be grand; :
: Boo-ka-pee, you can't see me, as long as I've got me head in t'sand..." :
: -- Michael Flanders, "The Ostrich" :
What if the stairs to Sokoban are on level 11?
Can a vault be created there, and if so can it have a portal to Ludios?
Presumably the Bigroom and the Rogue Level can't have vaults and thus
can't have a portal to Ludios.
Finally, people say that each (normal) level has a 1/2 chance of having
a vault. I couldn't quite decipher the code in the last few minutes,
but a looks like there are certain other conditions, like the level needs
to have enough rooms total, and presumably there needs to be enough space
for a vault. Can anyone tell me what conditions need to be met for
a vault to be generated on a level?
Robert
Impossible; Sokoban is always on the level below the Oracle, which
latter can't be deeper than DL9.
> Presumably the Bigroom and the Rogue Level can't have vaults and thus
> can't have a portal to Ludios.
Right.
> Finally, people say that each (normal) level has a 1/2 chance of having
> a vault. I couldn't quite decipher the code in the last few minutes,
> but a looks like there are certain other conditions, like the level needs
> to have enough rooms total, and presumably there needs to be enough space
> for a vault. Can anyone tell me what conditions need to be met for
> a vault to be generated on a level?
At least 6 normal rooms, 50% chance, only one shot at creating one; a
suitable space as well, but the definition of "suitable" is in the
rather complex realm of rect.c, which I don't feel up to attempting to
grok at this time of night :-)
Call that "v". Then
* if v is 1/2, the chance of getting Ludios is about 87%
* if v is 1/3, the chance of getting Ludios is about 73%
* if v is 1/4, the chance of getting Ludios is about 62%
But I suspect that v is pretty close to 1/2.
The analysis follows. Let me know where I'm just wrong.
The stairs down to the Mines are between levels 2 and 4.
The Oracle is created between 5 and 9.
Sokoban is the next level.
The Quest is 6 to 7 levels deeper than the Oracle.
The Bigroom exists 2/5 of the time and is between 10 and 12.
The Rogue level is between 15 and 18.
The dungeon is between 25 and 29 deep;
Medusa is between 4 and 1 before the bottom, which is the castle.
Equal chances always?
First, we have to figure out how many levels aren't eligible because they
are the Bigroom, the Rogue level, or contain the Quest portal. The Quest
portal could be on either of the other two; to figure out how often,
we divide by cases on where the Oracle appears:
1/5 Oracle 5
1/2 Quest 11
2/5*1/3 Bigroom 11
2/5*1/3 Bigroom 12
1/2 Quest 12
2/5*1/3 Bigroom 11
2/5*1/3 Bigroom 12
Rogue 15-18
subtotal: 13/15 miss 2 levels, 2/15 miss 3 levels
1/5 Oracle 6
1/2 Quest 12
2/5*1/3 Bigroom 11
2/5*1/3 Bigroom 12
1/2 Quest 13
2/5*2/3 Bigroom 11-12
Rogue 15-18
subtotal: 12/15 miss 2 levels, 3/15 miss 3 levels
1/5 Oracle 7
2/5*2/3 Bigroom 11-12
Quest 13-14
Rogue 15-18
subtotal: 11/15 miss 2 levels, 4/15 miss 3 levels
1/5 Oracle 8
2/5*2/3 Bigroom 11-12
1/2 Quest 14
Rogue 15-18
1/2 Quest 15
1/4 Rogue 15
3/4 Rogue 16-18
subtotal: 11/120 miss 1 level,
81/120 miss 2 levels, 28/120 miss 3 levels
1/5 Oracle 9
2/5*2/3 Bigroom 11-12
1/2 Quest 15
1/4 Rogue 15
3/4 Rogue 16-18
1/2 Quest 16
1/4 Rogue 16
3/4 Rogue 15,17,18
subtotal: 11/60 miss 1 level,
37/60 miss 2 levels, 12/60 miss 3 levels
grand total: 33/600 miss 1 level,
443/600 miss 2 levels,
124/600 miss 3 levels
That's the non-normal levels between 11 and 20 inclusive.
Medusa might appear anywhere between 21 and 28:
21: 1/20
22: 2/20
23: 3/20
24: 4/20
25: 4/20
26: 3/20
27: 2/20
28: 1/20
So the total number of levels that *might* contain the Ludios portal
is between 7 and 16:
7: 1/20*124/600 = 124/12000
8: 1/20*443/600 + 2/20*124/600 = 691/12000
9: 1/20*33/600 + 2/20*443/600 + 3/20*124/600 = 1291/12000
10: 2/20*33/600 + 3/20*443/600 + 4/20*124/600 = 1891/12000
11: 3/20*33/600 + 4/20*443/600 + 4/20*124/600 = 2367/12000
12: 4/20*33/600 + 4/20*443/600 + 3/20*124/600 = 2276/12000
13: 4/20*33/600 + 3/20*443/600 + 2/20*124/600 = 1709/12000
14: 3/20*33/600 + 2/20*443/600 + 1/20*124/600 = 1109/12000
15: 2/20*33/600 + 1/20*443/600 = 509/12000
16: 1/20*33/600 = 33/12000
Now all we need is the chance that one of these levels *doesn't* get
the portal to Ludios; if that chance is p, the chance of *not* getting
Ludios in your dungeon is
(124/12000)p^7 + (691/12000)p^8 + ... + (33/12000)p^16
A level doesn't get (a chance to have) the Ludios portal if
* it doesn't have a vault, or
* 2/3 of the time that it does have a vault
Let the chance the a normal level gets a vault be "v". Then
the chance of a level not getting the Ludios portal is (1-v/3).
That's the p from above. I won't copy what you get from plugging
that in for p. But now one can just evaluate depending on what we
think the chance of a random, normal level getting a vault is.
Robert
ouch, I think my head hurts ;^)