Announcement

Collapse
No announcement yet.

Random numbers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Random numbers

    I'm not sure if this is the right place for it, but I thought I'd copy a letter from the latest edition of Fortean Times, since it's about random numbers.

    It may look complicated, but it really isn't, I've explained any jargon in bold "notes for ogres":

    There is a paradox about random numbers. In order for a series to be random, no amount of knowledge about it can help predict the next number. This can be expressed in another way: no matter what length of sub-series we choose, all possibilities will occur equally often.
    Let's take a sub-series of length four in a mega-series of ones and zeros.( i.e. we have a list of thousands and thousands of random ones and zeros, but we're only looking at them 4 digits at a time) There are 16 different orders of ones and zeros that can occur. Each of these 16 must occur with the same frequency as the others if the series is random. Four zeros or four ones are no more significant than 1011 or 0001. The same principal holds for sub-series of any length.
    It's when these sub-series get very long that the paradox becomes evident. If we select, say, 2-to-the-power-of-50 as the length of our sub-series, ( let's just say it's a big number) there are bound to be some sub-series that are obviously ordered: continuous strings of millions of ones or zeros, or ones and zeros alternating consecutively millions of times. These sequences, which appear to be the opposite of random, must exist if the mega-series is itself random.
    If they didn't, we could find out that they didn't and we'd be able to predict with a high degree of probability that after a million consecutive zeros, the next number is going to be a one, whereas the very definition of a random series is that the probability of the next number being a one is evens, whatever the previous million numbers have been.
    In short, long random series must contain sub-series that are ordered. This can get us into a tangle. If, say, the results of a card guessing experiment to test telepathy are significantly better than random, it's inevitable that a demonstration of telepathy will be claimed. But it's equally possible that the non-random "results" are an ordered sub-series.
    ...
    It's a bit like having a random number machine that produces the usual jumble of ones and zeros for thousands of years. Everyone uses it and everyone is happy. Then one day it produces a million consecutive zeros. Everyone gets upset and the machine is taken out of commission. But it doesn't mean it's gone wrong. It's just inconvenient, that's all.
    Pure chance may exist, but it includes non-chance. Non-chance is a sub-set of chance.
    Kradlum O'Kradlum
    56th Level Ogre Warrior
    Grandmaster Smith (250), Master Fletcher (195), Master Brewer (158)

    Ardkor O'Kradlum
    29th Level Ogre Shaman
    Master Baker (175), Master Potter (135)

  • #2
    The above statement is correct.

    However there is an obvious atachment to what we are seeing in the EQ RNG being made (specific excerpts being printed)

    I would wish to debunk this corolation right away.

    It is true that a truely random number generator would produce two back to back failures in a series of (very) trivial combines. It is also true that such a generator would produce a series where you would get a success in between the failure. This is not the case in EQ.

    Seen this dozens of times (always erks me)[list]success
    success
    success
    success
    failure
    failure
    success
    success[/list:u]

    Have never, ever seen this[list]success
    success
    failure
    success
    failure
    success
    success
    success[/list:u]

    Of these two, the bottom one is just as likely as the top, statistically speaking.
    Marriel on Fennin Ro
    Shaman of the Frozen North, 65 Winters

    Brewing-250 | Baking-250 | Fishing-200 | Fletching-248
    Jewelcraft-250 |Pottery-250 | Tailoring-231 | Smithing-250

    Comment


    • #3
      It is easy to think of random number generators where each outcome is not equally likely. The important part is that past behavior is not predictive of future behavior.

      A 6 sided die generates random number between 1 and 6 with all outcomes being equally likely provided that the die is properly constructed.

      A set of 3 six sided dice generates random numbers between 3 and 18 but it should be clear that all the outcomes are not equally likely with some of the possible outcomes being much less likely then others. This does not mean that the numbers generated are not random.

      I personally think that SOE uses more then one RNG and that the one used to generated some kinds of events is "streaky" by design. In the past, I have discussed a simple method to create a RNG that behaves in streaks and this is not a demanding task. Such a generator does a much better job of modeling the behavior observed in the game.

      Basically, it is a mistake to think that a RNG must provide an equal chance for any individual outcome. No such restriction exists and the assumption is unwarranted. The behavior of the RNG in game is not consistent with a RNG that equally distributes outcomes across the available result space.

      I am no expert in human behavior, but I have read some literature that would shows that unpredictable results are more effective as a reward them predictable results. A streaky random number generator may have been intentionally chosen for reasons of how humans behave and the effectiveness of different reward strategies.
      Elder Grug :: Oracle of War :: Stormhammer

      Comment


      • #4
        Grug,

        That is a truly interesting hypothesis. I'm sure that the effort to implement would not be that great. So here's my extrapolation - if in fact the EQ tradeskill RNG is using a streaky algorithm, then it would stand to reason that when you were about to attempt an extremely difficult or costly combine (i.e. shawl quests, my current bane) then you WOULD increase your chance of success by making cheap items until you get a couple failures, then attempting your difficult combine. Of course in the case of a statistically pure RNG that would not be true.

        Buto Dakkel
        52 Enchanter, Tallon Zek
        250 JC, trophy
        135 Baking
        125 Pottery
        No, the other skills aren't worth mentioning

        Comment


        • #5
          It's funny you should mention that, as there is something I have meant to test but never got round to it:

          When I started smithing Shadowscream I was also trying to boost my tailoring, so I had a couple of stacks of greyhopper hides in my packs. I needed to clear out some space to make the shadowscream, so I sat in Shar Vahl and tailored all the greyhopper hides into armour. My skill was only in the 30's, so I had a lot of failures and I think I got only 1 skillup point. I dumped the armour on a merchant and then went on to smithing and got a skillup almost immediately.

          I keep meaning to test this again, by doing a lot of combines that I know I will fail on, and probably wouldn't get a skill up (my WIS and INT are less than 100), and then trying smithing to see if I get a skillup faster than my current rate.
          Kradlum O'Kradlum
          56th Level Ogre Warrior
          Grandmaster Smith (250), Master Fletcher (195), Master Brewer (158)

          Ardkor O'Kradlum
          29th Level Ogre Shaman
          Master Baker (175), Master Potter (135)

          Comment


          • #6
            I evaluate/use pseudo random number generators in my work (simulations of extinction, among other things). I have evaluated and rejected several common ones -- essentially all of the ones in the popular programming languages' standard library. There are some good ones (IMSL, for example), but, for the most part, I have had to resort to creating my own.

            That said, there is no good way that I know to test the PRNG (pseudo random number generator) for EQ. But, I can give a couple of principles:

            1) Good PRNGs cost a lot in terms of time to create.
            2) It an application calls the PRNG a lot, function overhead can be significant.

            Given the nature of EQ, I surmise:
            1) EQ's PRNG is probably not the best designed -- I suspect it is a canned rountine.
            2) Due to the number of calls made, I suspect that the PRNG returns a vector -- unless properly designed, this leads to a LOT of autocorrelation.
            3) I would not be suprised if the number returned was a byte for the tradeskills. The easiest way to get this byte is to take apart the returned integer into 4 or 8 bytes -- almost guaranteed to be autocorrelated.

            For the most part, I think this system works well for EQ, but can be frustrating for tradeskillers. I kept track of all my combines for jewelry from 30 to 200 and as soon as I remember where I put it ( ), I'll look at it.
            Pinyon Treedotter
            Level 59 Preserver
            "Always a Guardian", Luclin Server
            Magelo Profile
            User of the Grandmaster Tailor's Needle

            Comment


            • #7
              Pinyon, I agree with #2 and 3 of your surmise.

              Of #1, I would say that a lot of work has been given to the RNG routine. A function that must be hit thousands, maybe millions of times a second. However, knowing a good smattering of number theory, and conversely know an lot of programmers who have far less number theory then I, I expect that the emphasis was placed into returning a value in the shortest time possible and not the randomness or streakyness of the returned sets.

              But this mearly adds weight to the argument for #2 and #3 ^_^

              Another oddity to include in disection of the pRNG would be the adjustments made to tradeskill hardness. From SOE's writings it looks like they made a small adjustment. Maybe that means they only adjusted them by 1. They adjusted Pottery toughness up by one and the net result was that pottery was twice as hard (I was there in the middle and have good data that supports it being twice as hard. albeit small pool sindrome not withstanding). Could SOE have a much smaller bit width then we could imagine?

              Also, thinking on results, it is much easier to map the results onto 1 in 64 instead of a 1 in 100 (percentage). This makes me wonder if it may even be courser then that? 1 in 16? Is it concievable?

              -----------------------------------------------

              Anyways, I think I have found a set of data that may work under analysis. Fishing for Cobalt Cod in Cobalt Scar. My skill is maxed so that doesn't change. And I get the same kind of streaky numbers when catching fish. i.e. long periods of catching other stuff; short periods with lots of Cod.

              Thanks all
              Marriel on Fennin Ro
              Shaman of the Frozen North, 65 Winters

              Brewing-250 | Baking-250 | Fishing-200 | Fletching-248
              Jewelcraft-250 |Pottery-250 | Tailoring-231 | Smithing-250

              Comment


              • #8
                We are talking about a game and not scientific modeling, so how "random" the random number generator has little impact on weather or not the results serve the intended purpose. A stock library routine would work just fine.

                I will describe a simple streaky generator.

                a) create a random number between 0 and 79 (any stock method)
                b) add to this a number between 1 and 20 wich varies smoothly from
                1 to 20 and back to 1 over time. Perhaps incremented once every
                1 min.

                This random number generator would create numbers between 1 and 100, but at times the only possible outcomes would be between 1 and 80 and at other times the only possible outcomes would be between 20 and 100.

                If the chance for positive outcome was large then you would have a significant chance for a positive event when the added constant was 1 instead of 20, but if the chance of a positive outcome was quite small, then you would experience long periods of time when no positive outcomes would be generated and a shorter period of time when positive results could happen.

                Take 5% and say a positive result was when the RNG returned a number between 96 and 100. Only when the added number was between 16 and 20 would a positive result even be possible.

                I think that the RNG used in trade skills is the same as used for lots of things like rare spawns and rare drops. I have observed streaky behavior in lots of events. Like a vary rare mob popping back to back or catching a rare fish.

                I am in no way saying that EQ is using my algorithm, but if you compare the observable behavior of the RNG in EQ to both my simple streaking RNG and a normal flat distribution RNG, my model comes much closer to the type of behavior that we have all observed.

                In the past, I have acted on this hypothesis and have been rewarded. I can give the example of hunting the AC in OOT for the JBoots quest. I have personally killed the AC 5 times and have never spent more then about 30 minutes to an hour camping him. All I would do is take over the camp directly after someone else had killed the AC. If he did not pop in a few spawns I would just go back to killing seafuries and abandon the camp. I don't think I have totaled more then 6 to 8 hours or so to get 5 AC rings for the quest.

                The method I would use to take advantage of this in trade skills, say for a tailoring combine for a thurg shawl quest, would be to do a series of fairly hard combines and wait until I had a positive outcome and then move directly to the important combine. Actions like zoning, or camping may also reset the random number generator and if the "streaking" was using time as a base, different events may use different time ranges. I could write a fairly simple subroutine that took inputs like time frame, start and end random number range, start and end additive number, current system time, and chance of positive outcome and return either true / false.
                I personally think the EQ probably has invested the hour or so that it might take to write such a simple routine and it would even serve to generate the normal flat distributions for use with /rand command just by changing the parameters.

                This is of corse is all just Ogre speculation *grins*.
                Elder Grug :: Oracle of War :: Stormhammer

                Comment

                Working...
                X