RoS +19 -- is this a record?
Collapse
X
-
If I was doing it, I'd start with something like Mx = (depth + d(100/x)) * x / 100. So M4 becomes something like (depth + d25) / 25. You can tweak that as you like to increase [larger die] or reduce variance [more smaller dice], enforce a minimum depth, or whatever. Then I'd change 100 probably to 180 so 180/x is an integer most of the time and adjust the other numbers accordingly. There ought to be a simple understandable solution that comes close enough to whatever goals you have. -
From what I see, the intent was to get a distribution very strongly skewed to the low end when item generation level is low, skewed to the high end when that level is high, and not use any floating-point arithmetic in the process. The current implementation of m_bonus() does do that. I do not have any ready ideas for meeting that intent with something simpler. Drawing multiple values from a uniform distribution, [0, bonus maximum] and then either taking the minimum of those draws, to skew the result to the low end, or the maximum, to skew the result to the high end, is fairly simple to explain, but it needs a large number of draws to get anywhere close to how m_bonus() is skewed when the item generation level is low and would allow for lucky finds at low levels that m_bonus() does not. A table lookup into a Poisson distribution with mean, (bonus maximum * item generation level) / 128, would work, but would still involve coercing values beyond the maximum, like the current m_bonus() does, is not that much easier to explain than the current m_bonus(), and involves adding another table while the current m_bonus() can reuse what is already there for Rand_normal().Leave a comment:
-
That looks like a good explanation. You checked the boxes that any reference to a normal distribution should mention mean and variance. It's also important that you changed from an example of M4, to a formula for Mx, since 4 is used multiple times in the formula.
I'd prefer anything that complicated be replaced with a different approach, but, assuming you really like the distribution it generates, there's no point in changing something that works for you.Leave a comment:
-
From https://github.com/angband/angband/pull/6519 , this is the new proposed text in object.txt:I thought that I remembered the M thing was level dependent, but the text file specifically says
# M4 uses the m_bonus function to generate a number between 0 and
# 4 according to a normal distribution.
That's highly misleading. Assuming it cannot be explained simply, how about changing it to something like
# M4 has a range from 0 to 4 that is strongly biased according to the generation depth. It is complicated. For details see m_bonus in z-rand.c
The text in ego_item.txt is simpler since it does not set dice for effects.Code:Some fields accept randomized numbers of the form "10+2d3M4". 10 is the non-variable base. 2d3 is a standard die roll. The meaning of M4 depends on the context. For an effect's dice, what 'M' or 'm' does depends on the specific effect. For most effects, it does nothing. The effects where 'M' or 'm' is used are: ENCHANT: Mx or mx in the dice expression acts like Mx in dice expressions not used for an effect. See below for the details. HEAL_HP: Mx or mx in the dice expression specifies that the healing amount is (x * (max HP - current HP)) / 100 or the value of the rest of the dice expression, whichever is greater. SWARM: Mx or mx in the dice expression specifies that there are x balls. TELEPORT: Mx or mx in the dice expression specifies that the base distance teleported is (x * MAX(dungeon height in grids, dungeon width in grids)) / 100. The base amount is ignored in that case. Any die, i.e. 2d3 from the example, are ignored, regardless of whether 'M' is present or not. Besides the meaning of 'M' in an effect's dice, some effects abuse other parts of the dice expression as a way to pass additional parameters to the effect: when in doubt, check the effect's handler in the code to see how it uses the dice. Outside of dice for effects, Mx or mx means: 1) Generate a random value from an approximate normal distribution (results are integers rather than continuous; differences from the mean are restricted to be less than 4 standard deviations). The mean of the distribution is (x * item generation level) / 128 (that mean is rounded up to the next largest integer if a random roll between 0 and 127 is less than the remainder from x * item generation level divided by 128; otherwise, the fractional part is discarded). The standard deviation of the distribution is x / 4 (that standard deviation is rounded up if a random roll between 0 and 3 is less than the remainder from x divided by 4; otherwise, the fractional part is discarded). 2) Coerce the result of (1) to be between 0 and x, inclusive. 3) Add the result of (2) to the result of the rest of the dice expression.Leave a comment:
-
So it’s rare, but not nearly as rare as the current record holder of +24. Thanks for the replies.
Leave a comment:
-
I thought that I remembered the M thing was level dependent, but the text file specifically says
# M4 uses the m_bonus function to generate a number between 0 and
# 4 according to a normal distribution.
That's highly misleading. Assuming it cannot be explained simply, how about changing it to something like
# M4 has a range from 0 to 4 that is strongly biased according to the generation depth. It is complicated. For details see m_bonus in z-rand.c
Leave a comment:
-
Since I bungled the base bonus, I corrected my earlier post. The 4+M6 base gives a value between 4 and 10 dependent on the generation level for the item. For Carcharoth killed on level 94, the items should be generated at level 100, and the ring of speed's base value would most likely be 9. The coin flips are not specified because there is an 'M' in the dice: they are from a special case in obj-make.c's apply_magic().Leave a comment:
-
4+M6 is nearly always +10 base or almost, and then the M gives a series of coin flips for extra +1s.
A +19 ring is around a 1/512 occurrence (per RoS, maybe account for M 1/700-1/800) at depth.
Here's a char with a RoS +19 and a RoS +18 -
Leave a comment:
-
Surely creation depth has to figure in somehow. Speed rings sure seem to get better the deeper you go. Am I wrong yet again?
Also, 4.2.5 object.txt mentions SPEED 4+M6 which is better than 1d5 if I understood the comments at the top of the file. Have speed ring plusses changed much in recent versions?Leave a comment:
-
The bit of blather below was from conflating dragon armor of speed, base d5, with the supercharging done for rings of speed. As pointed out by others, the base bonus for rings of speed is 4+M6, a value between 4 and 10 dependent on the generation level for the item. The base bonus is increased by the result of a sequence of coin flips: tails end the sequence and heads adds one to the bonus and continues the sequence. If one got the most likely base bonus, 8, for a ring of speed with a generation level of 94, the chance that it would be boosted to +19 is 1/2^12.
WRONG:
The base bonus is 1d5. Anything beyond that is set by a series of fair coin flips: tails ends the series; heads adds one to the bonus and continues the series. So once you get a ring of speed, the chance that it is +19 is 1/5 * (1/2^19 + 1/2^18 + 1/2^17 + 1/2^16 + 1/2^15) = 31 / (5 * 2^19) or roughly a 1.18 chance out of a hundred thousand. Roughly 3.70 out of ten million rings of speed would match the one PowerWyrm found.Leave a comment:
-
By a remarkable coincidence, I was searching for some old exploit just *yesterday*, and I came upon https://angband.live/ladder/ladder-show.php?id=21757
from PowerWyrm mentioning RoS +24.Leave a comment:
-
RoS +19 -- is this a record?
After I killed Carcharoth at level 94, he dropped something I've never seen in my years of Angband-ing: a +19 RoS! I can't recall seeing anything over +15 in the past.
So, like the subject line says: Is this a record? How did this happen? What are the odds? I seem to recall reading here at some point that there was theoretically no limit to how high the bonus number could get but the chances of the number going up gets significantly smaller with each subsequent increase. True? Oh, and this is with 4.2.5.Tags: None
Leave a comment: