Is your random number generator broken?

2

Comments

  • carrion_pigeons
    carrion_pigeons Posts: 942 Critical Contributor
    Random is an idealized word. In real life there isn't any such thing as true randomness. When we use the word in relation to actual events, we aren't really talking about conforming to a normal distribution or multiple things having equal chances to happen. What we mean is that whatever is actually driving the outcome between a certain number of possibilities is both unknown and unable to be anticipated to any degree.

    So when someone pulls 5 Moonstones in a row and says, "Is this *really* random*?" what they actually mean is, "Is there some way I could have anticipated any of these pulls based on any of the previous ones?"

    Or, to be more specific and testable, "If I pull 2 red Moonstones in a row again, am I more than usually likely to draw a 3rd?"

    Of anyone wants to keep track of their pulls and see how often two identical pulls is followed by a third of the same, it should be a pretty easy experiment to help come up with a concrete answer, rather than the nebulous "this doesn't seem random" that actually doesn't mean anything at all.
  • Piro_plock
    Piro_plock Posts: 287 Mover and Shaker
    Random is an idealized word. In real life there isn't any such thing as true randomness.
    Quantum mechanics would like to disagree icon_e_biggrin.gif
    I agree with the rest of the post though.
  • MushroomGenius808
    MushroomGenius808 Posts: 138 Tile Toppler
    My last four 4* pulls....

    Purple Ant Man
    Purple Ant Man (same day)
    - Current Ant Man is 5/1/4, these two covers sitting in queue

    Purple X-23
    Purple X-23 (same day)
    - X-23 is now 5/0/5 =\
  • roderic1
    roderic1 Posts: 40 Just Dropped In
    This has happened to me on two different occasions. I thought it was odd and pointed it out to my alliance.

    I find it odd because I *believe* that the percentages for covers given out between 1* and 2* after PVP matches aren't the same percentages, leaning more towards 1*. So the idea that you would get the exact same 2* cover more than 3 times in a row in back to back matches seems not random. Hearing others report the same, just makes you wonder.

    I don't particularly care in this instance as I have a 2* farm going. But it does make you wonder about token pulls. But I've never pulled the exact same cover from five tokens, so I'm not worried yet.
  • Nick441234
    Nick441234 Posts: 1,496 Chairperson of the Boards
    I just got my 6th Moonstone red, all still sat in my queue as purple and black clearly dont exist in my game anymore. icon_lol.gif
  • huktonfonix
    huktonfonix Posts: 214 Tile Toppler
    A run of 5 of exactly the same cover in five consecutive lightning round matches has occurred at least 4 times recently for me. Several alliance mates have noticed the same. I'm well aware that these forums are full of reports that misunderstand coincidence, randomness, and confirmation bias, but the odds of this happening naturally at this frequency are astronomical. It's pretty clear that there is a bug in the "random" assignment of lightning round rewards.

    However, my last one was a run of 5x Bagman purple, so I'd be fine with this bug going undiscovered.
  • nigelregal
    nigelregal Posts: 184 Tile Toppler
    The probability of getting 5 red moonstones in a row is 1.1083501E-8

    Not sure what that means exactly. Maybe like 1 in a billion chance
  • Soma
    Soma Posts: 24 Just Dropped In
    nigelregal wrote:
    The probability of getting 5 red moonstones in a row is 1.1083501E-8

    So you're saying there's a chance! icon_lol.gif
  • Nick441234
    Nick441234 Posts: 1,496 Chairperson of the Boards
    I finally got 2 black covers for Moonstone so my streak ended at 6 reds in a row. Thankfully, that also meant the 6 in queue didn't go to waste but the first red I received did get down to 3 days before expiring.
  • Twysta
    Twysta Posts: 1,597 Chairperson of the Boards
    This has happened to me on at least 4 occasions in the last couple of months, just one color over and over of teh same character. I usually get at least 7 though. Got 9 blue OBW's yesterday.
  • firethorne
    firethorne Posts: 1,505 Chairperson of the Boards
    Okay, for one person to hit a one in a billion streak, maybe. But for many people reporting "runs," some in the one in a trillion possibility range, I'm going to go out on a limb and say this is more like the current state of Thanos's black, or Starlord's yellow, or Redwing, or... you get the picture. We all know the code isn't always firing on all cylinders.

    I'm sticking with my theory. Something is causing us to read our personal random seed value multiple times before a new one is written.
  • Fionsel
    Fionsel Posts: 35 Just Dropped In
    Ah a RNG topic. As a mathematician always interesting to read.

    Let me give a small example:

    Let's take a set of 4 numbers, being 1, 2, 3 and 4. Let's say I have a 100% random RNG (for the sake of the argument let's not debate such existence) and I'll present you with a fair shuffle of those 4 numbers. If I give you the outcome 1, 2, 3, 4 then most people will actually claim the RNG is broken. However, looking at it realistically this outcome is one of the 24 possible shuffles so it is perfectly fine.

    This simple example holds true for a lot of experiences people have in games or what not. Let's say there are 100 covers to pick from of which a red moonstone is one, then chances are 1 in 100^5 = 1 in 10 billion of that happening. However, any combination of 5 covers in a specific order has the same chance of happening. So let's say our set of 100 covers also contains a Green RHulk, Purple Star-Lord, Yellow IM40, Green Thor and a Blue Daken. Let's say you get those 5 covers in that specific order. Will you complain? Most likely not as you don't see a pattern. However it has the exact same chance of happening as the 5 red moonstones in a row. That's the thing with humans, we keep the occurrences where we notice a pattern in memory and ignore the rest. Given the huge player base and the amount of covers we pull, these patterns are bound to happen.

    This is not to defend d3. Having worked at a company which certifies Random Number Generators I do know mistakes are made in software RNG's. They are just not common as people think when they spot patterns.
  • carrion_pigeons
    carrion_pigeons Posts: 942 Critical Contributor
    Fionsel wrote:
    Ah a RNG topic. As a mathematician always interesting to read.

    As also a mathematician, I kinda wonder if you've been reading the topic or only the OP. We've kinda moved past the stage of talking about pattern recognition and are more on the topic of pattern reproduction. As someone who has worked to certify rn generators, you might have some useful input on the topic.
  • Fionsel
    Fionsel Posts: 35 Just Dropped In
    I've read everything actually and most posts, also the last 4 ones before mine, are talking about the odds of occurring, friends seeing patters and discussing whether or not the RNG is fair. Hence my contribution explaining why seeing patterns is a misconception.

    Basically any RNG produces random numbers of a fixed number of bits. Most RNG's generate 32 bits, some generate 48 bits (java.util.Random for instance) and I believe 64 bits generators exist as well. One can test the fairness of these bits. However, in 99% of all cases in computer games you actually require a scaled number. So if the scaling is heavily flawed, it doesn't matter if the RNG itself is fair, the scaled outcomes will be biased. So typically our analysis would be based on the combination. The analysis would be conducted by drawing a huge amount of numbers in the ranged which are used by the application. By huge we typically take 1000 times the range. So if numbers are scaled to 100 we would draw 100.000 outcomes and run the analysis on those numbers.

    A separate section is seeding. I've seen implementations of a Mersenne Twister algorithm, having a cycle of 2^19937-1 which is roughly 10^6001, which were seeded every single pull with a single 32-bits integer determined by a linear RNG. This resulted in a new RNG having a cycle of only 2^32 and hence failing most tests.

    It's kinda impossible to conduct any analysis on this game. We don't know the ranges used for LR's for instance. Secondly, in order to do proper analysis we would require consecutive pulls from the entire player base. Lastly, as the game most likely uses the same RNG for generating outcomes during the game as for determining prices it clouds the analysis.
  • Crnch73
    Crnch73 Posts: 504 Critical Contributor
    this thread makes me happy. Not being sarcastic, just knowing that A) it happens to a lot of people, so it's not just me... and B) the numbers nerd in me gets to read what mathematicians believe.

    I work in programming a lot, and as many can imagine, we rarely use random number generators. I have only seen or used them in C++ and the like, so it's always rand-mod applications at best. Seeing the last few posts was truly interesting. It opens my eyes past the "choose-then-choose" and "choose-replace-choose" applications. However, this is why I truly hate all probability related math... it's all theoretical, nothing is concrete. Sure, you SHOULD get the red ball after choosing 3 black ones, but the chaos ensues.

    At least in this game, we know that it's not truly "random", there are certainly weights given to specific outcomes.
  • Nick441234
    Nick441234 Posts: 1,496 Chairperson of the Boards
    Seems I'm onto another run. I need a red to finish off my 2* Wolverine so I can champ him again and am currently sitting on 5 covers of both green and yellow in the queue. Lets see how long this takes to finally draw a red.
  • OneLastGambit
    OneLastGambit Posts: 1,963 Chairperson of the Boards
    Jarvind wrote:
    (Seventeen posts angrily/condescendingly explaining what "random" means)

    Do you think you know?

    Because I would just love to hear what you think it means. Having an actual discussion where people learn things seems to be so much better than plugging your ears and saying lalala whenever someone tries to explain something.

    I believe he was sarcastically preempting the forum response.
  • LHammer
    LHammer Posts: 108 Tile Toppler
    Getting back to firethorne's initial point...

    I just did an LR seed where I pulled seven Yelena purples in a row. Now, if you're playtesting a game (and lets face it, we're all unpaid playtesters) and you see something like that happen do you think "Boy-howdy that's a lucky run" or do you write up a bug report on the reward RNG?

    Personally, I think some clever programmer snuck in an Easter egg called "Crazy ex-girlfriend stalker"
  • roderic1
    roderic1 Posts: 40 Just Dropped In
    Do we consider 1* and 2* covers to have the same chance of happening? The total number of unique 1* covers is 19, i believe. Meanwhile, there are 42 unique 2* covers. So we should see more 2* cover rewards from PVP matches, two times more. This does not happen. So, is getting five 2* red Moonstone covers in a row just as likely as any other 5 cover outcome?
  • Piro_plock
    Piro_plock Posts: 287 Mover and Shaker
    roderic1 wrote:
    Do we consider 1* and 2* covers to have the same chance of happening? The total number of unique 1* covers is 19, i believe. Meanwhile, there are 42 unique 2* covers. So we should see more 2* cover rewards from PVP matches, two times more. This does not happen. So, is getting five 2* red Moonstone covers in a row just as likely as any other 5 cover outcome?
    No, 1* are much more likely to drop than 2*.