Ring of speed range of values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nate
    Rookie
    • Mar 2010
    • 19

    #16
    I should be able to generate a chart for the normal distribution from 0-5 from here. Thanks so much Omnipact and Derakon.

    Comment

    • Nate
      Rookie
      • Mar 2010
      • 19

      #17
      No, I can't. I see now that the algorithm isn't just a normal distribution between 0-10 and I wouldn't know the std dev if it was. Anyway, I'll look for the algorithm in the code if I really want to do my own chart. Thanks again.

      Comment

      • AnonymousHero
        Veteran
        • Jun 2007
        • 1393

        #18
        EDIT: ... and now I notice that there are two pages in this topic. Oh well.

        My Vanilla Priest also found a +23.

        Comment

        • PowerDiver
          Prophet
          • Mar 2008
          • 2820

          #19
          Originally posted by Derakon
          The table I quoted would be compressed to have 6 columns instead of 11. So yes, there's a "different chart" for each possible max value. Except that there's no actual chart; the table is simply an example of what running the algorithm with a specific max tens of thousands of times generated. I quoted the table because it was easier than trying to explain the actual distribution used.
          If you already have the work done to calculate this stuff, would you be willing to produce a table of the probabilities of an amulet of the magi dropped for each depth to have a pval of +4?

          Comment

          • Nate
            Rookie
            • Mar 2010
            • 19

            #20
            After some hunting, mostly in the object folder, I can't find the pval calculation stuff in the source. I'm assuming this is where the chart Derakon mentions is located. Any leads?

            Comment

            • Omnipact
              Rookie
              • Jun 2007
              • 23

              #21
              Originally posted by Nate
              After some hunting, mostly in the object folder, I can't find the pval calculation stuff in the source. I'm assuming this is where the chart Derakon mentions is located. Any leads?
              Have a look at z-rand.c

              Comment

              • Derakon
                Prophet
                • Dec 2009
                • 9022

                #22
                Okay, from my reading of the actual code for m_bonus, it appears to be trying to generate a normal distribution with average value (max bonus * item level / 128) and standard deviation of (max value / 4). There's a lot of weird stuff in there to approximate floating point with integer math, but I believe that's broadly accurate. And of course, values are clamped to be between 0 and the max value.

                Incidentally, I found this code by starting from the documentation in object.txt, which says:
                Code:
                # Some fields accept randomized numbers of the form "10+2d3M4" where
                # 10 is the non-variable base, 2d3 is a standard die roll, and
                # M4 uses the m_bonus function to generate a number between 0 and
                # 4 according to a normal distribution.
                From there, it's fairly straightforward to find the definition of m_bonus in the source code.

                Comment

                • PowerDiver
                  Prophet
                  • Mar 2008
                  • 2820

                  #23
                  [edit] deleted my post, I read the wrong entry

                  Comment

                  • Nate
                    Rookie
                    • Mar 2010
                    • 19

                    #24
                    Is the item level the level on which the item is found?

                    If so, for a ROS at DL 128 the m5 enchantment should be a random # drawn from a normal distribution with mean = (5*128)/128 = 5 and std dev = 5/4 = 1.25

                    When I run this 1000 times in Excel using this function I found on the internet: =NORMINV(RAND(),5,1.25), I get 64.5% with a bonus of 5 or more.

                    For the Amulet of the Magi, I calculated means for the normal distribution of the following:

                    DL 50 = (3*50)/128 = 1.171875
                    DL 100 = (3*100)/128 = 2.34375
                    DL128 = (3*128)/128 = 3

                    Standard Deviation for each is 3/4 = .75

                    For 1000 random numbers these are the precentages I found for an Amulet of the Magi getting a +4 enchantment:

                    DL50 = 0%
                    DL100 = 7.1%
                    DL128 = 51.1%

                    0% doesn't mean it is impossible, just for that this run of 1000 numbers, none achieved the max enchantment at DL50.

                    Comment

                    • Derakon
                      Prophet
                      • Dec 2009
                      • 9022

                      #25
                      Originally posted by Nate
                      Is the item level the level on which the item is found?
                      Only if the item is found on the floor outside of a vault. Items dropped by monsters use max(monster level, avg(monster level, dungeon level)), items dropped by chests use a hardcoded value depending on the type of chest, items in vaults get a boost applied to them depending on where they are in the vault, etc.

                      Comment

                      • Nate
                        Rookie
                        • Mar 2010
                        • 19

                        #26
                        If I'm doing everything correctly, chances of getting a ROS +23 at DL 128 IF the maximum of 10 is achieved from the d5m5 calculation are:

                        1/5(chances that rolling a 5 sided die results in a 5)*1/64.5(chances that the random number generated from the normal distribution with mean 5 std dev 1.25 is a 5)*1/8192(13 consecutive coin flips of the same result) = 1 in 2,641,920. To this must be added the chances of getting to +23 from each of the other possible results of the d5m5 check (1 through 9). This shouldn't add much to the total because the number of consecutive same coin flips required increases and those chances are small.

                        Comment

                        • PowerDiver
                          Prophet
                          • Mar 2008
                          • 2820

                          #27
                          Originally posted by Derakon
                          Only if the item is found on the floor outside of a vault. Items dropped by monsters use max(monster level, avg(monster level, dungeon level)), items dropped by chests use a hardcoded value depending on the type of chest, items in vaults get a boost applied to them depending on where they are in the vault, etc.
                          Nate is playing 312v2, which I believe uses max(monster level, dungeon level) before boosts.

                          Comment

                          • Nate
                            Rookie
                            • Mar 2010
                            • 19

                            #28
                            Nope, I didn't do everything correctly. +23 is not nearly that rare. I was counting 64.5% as 1/64.5, not 64.5/100. The revised chances for ROS +23 at DL128 are approx. 1 in 26702.

                            The numbers for the Amulet of the Magi should be correct. Sorry! I'm actually surprised we haven't seen higher then +23 with all the players out there (+24 is about 1 in 53407).
                            Last edited by Nate; October 29, 2010, 15:06.

                            Comment

                            • Nate
                              Rookie
                              • Mar 2010
                              • 19

                              #29
                              My new number includes the chances for all the possible values (1-10) of the d5m5 calculation, i.e. d5m5=10, consecutive coin flips=13; d5m5=9, consecutive coin flips=14, and so on down to d5m5=1, consecutive coin flips=22. The addition of these contributed more than I expected to the total chances.

                              Comment

                              • Nate
                                Rookie
                                • Mar 2010
                                • 19

                                #30
                                And as it appears that the item level used in the m_bonus function is not necessarily simply the level on which the item is found, my calculation would only apply to ROS lying on the dungeon floor not in a vault. Yikes.

                                Comment

                                Working...
                                😀
                                😂
                                🥰
                                😘
                                🤢
                                😎
                                😞
                                😡
                                👍
                                👎