1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice

Draconi working on RNG any questions

Discussion in 'UHall' started by Storm, May 20, 2009.

  1. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    Tim 'Draconi' Cotten I'm writing up the next dev essay on UO's Random Number Generator - we've discovered a *lot* about it. Any specific questions/requests you'd like to see included?

    This was posted by Draconi and as long as there are not to many I will try to post questions on face book for you all! That is for those who do not have it ! if you do post em yourself :)
     
  2. Crysta

    Crysta Babbling Loonie
    Stratics Veteran Alumni

    Joined:
    May 12, 2008
    Messages:
    2,418
    Likes Received:
    73
    "Why does the RNG hate us?"

    :p
     
  3. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    lol I already posted asking exactly how does it work and will they be making changes to it!
     
  4. Yalp

    Yalp Guest

    I'm wondering what is the explanation for such inconsistencies across toons on the same account? Assuming all other factors are equal (ie size of parties, champ boss, damage rate and output, etc)
     
  5. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    posted!
     
  6. Zodia

    Zodia Guest

    [​IMG]

    ^^^
    So I heard this is a picture of the RNG machine.
    And there's a guy at EA who draws the numbers out and puts them into the computer.
    Is that about right?
     
  7. Viper09

    Viper09 Grand Poobah
    Stratics Veteran

    Joined:
    May 16, 2008
    Messages:
    6,680
    Likes Received:
    824
    :lol:
     
  8. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    lol sorry cant post pics in the comment sections of facebook but that is funny!
     
  9. Bomb Bloke

    Bomb Bloke Lore Keeper
    Stratics Veteran

    Joined:
    Apr 26, 2008
    Messages:
    850
    Likes Received:
    0
    It's inaccurate, though. The UO RNG has lots more dice with the same number on them...
     
  10. MoneyMaker

    MoneyMaker Guest

    Is the program used to create the RnG in any way like the one used in most casino slot machines? If so, how often does EA check the calibration?
    Thank You for posting for us. We are just not that trusting of Facebook.
     
  11. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    Posted ... and you are welcome
     
  12. JC the Builder

    JC the Builder Crazed Zealot
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    3,154
    Likes Received:
    708
    If you are using a dice cup and looking at the combined dice roll it is not going to be random because not all numbers have the same number of combinations. For example a 2 only has one possible outcome while a 7 has 4 or something.
     
  13. guum

    guum Guest

    Are they planning on making it less streaky? Cause I actually kinda like the streakiness of the RNG...if I get a taming gain, I know there's a good chance another one is coming up shortly.
     
  14. Maplestone

    Maplestone Crazed Zealot
    Stratics Veteran

    Joined:
    Jul 26, 2008
    Messages:
    3,657
    Likes Received:
    9
    Is it random?
     
  15. MalagAste

    MalagAste Belaern d'Zhaunil
    Reporter Professional Governor Stratics Veteran Stratics Legend Campaign Supporter Royal Knight

    Joined:
    Aug 21, 2000
    Messages:
    18,950
    Likes Received:
    5,434
    I think they need to look at T-Map and MIB loot and adjust and help them more than the RNG..... but that's just my opinion.....
     
  16. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    posted
     
  17. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    posted
     
  18. Harlequin

    Harlequin Babbling Loonie
    Stratics Veteran

    Joined:
    Jun 11, 2008
    Messages:
    2,716
    Likes Received:
    32
    Why did 8x8 work?

    Is the random number seed tied to the character? Meaning that it's true that bad luck seems to follow a person :p

    Is there any truth in the age old myth that certain actions - eating/blessing/dying/mounting a horse/casting a spell/moving to a different subserver will re-seed the character's rng?

    If so, which actions will do this?

    Can they reveal what the algorithmn being used is?

    :D
     
  19. Sweeney

    Sweeney Guest

    Is the algorithm custom-made (and if so how was it tested?), or is it based on one of the many well-known and well-tested publicly available methods?
     
  20. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    posted
     
  21. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    posted
     
  22. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    ok I will be off of face book the rest of the night!
     
  23. Whinemaker

    Whinemaker Guest

    Does it mean there were actually *lot* of things you didn't know about it?
     
  24. I have 2 questions:

    1. Why is it so ****ed up?

    2. When is the Anti-RNG RNG going to be implemented to counter the ****ed up RNG we have now?
     
  25. Mairut

    Mairut Guest

    Crazy question (not for facebook):

    What does RNG stand for? :p
     
  26. Maplestone

    Maplestone Crazed Zealot
    Stratics Veteran

    Joined:
    Jul 26, 2008
    Messages:
    3,657
    Likes Received:
    9
    Random Number Generator

    There really isn't any way for a computer to generate true random numbers, so most use a formula that you repeat over and over to produce fake random numbers ... such as taking your number, multiplying it by a big prime number, adding some junk then looking at the last few digits.

    Pick a bad combination of seed and formula and you can end up with bad random numbers (I did a simulation once in university that kept giving me odd results - I spent a month debugging before discovering that my simulation was just really, really good at finding non-random patterns in the computer's built-in random number generator)
     
  27. Dragonchilde

    Dragonchilde Guest

    I think many RNGs use system time as a seed - it's data that all computers have, and will likely be in a familiar format. But yes, true random numbers aren't possible with modern computers.
     
  28. PsychoKinetic

    PsychoKinetic Journeyman
    Stratics Veteran

    Joined:
    May 24, 2008
    Messages:
    252
    Likes Received:
    14
    I believe its using system time and the characters coordinates in-game together to generate the rolls.
     
  29. HunterXHunter

    HunterXHunter Visitor

    Joined:
    May 9, 2009
    Messages:
    72
    Likes Received:
    0
    I dont really think theres a fix to RNG. My professor in my computer engineering 5 years ago kept on explaining how RNG function we used writing programs is actually generating "random numbers" following a "pattern"... thus not truely random but yet random in someways.

    I dont know how this rng thing in UO can be fixed especially when sometimes 99% chance to hit can translates into 2 to 3 consective misses. The most obvious example you can reproduce is to load yourself up with 99lrc and run with it for awhile... you should only get the no reg message once every 100 casts yet it will happen enough for you to ignore.

    Another is with runic kits, one kit of 15 charges Ive gotten 12 bows with balanced mod on them and one that gave me all 15 bows with non-100% physical distribution (i use ash). Or human parry (20parry w/25dex) twice in a row... so on.
     
  30. Zyon Rockler

    Zyon Rockler Guest

    I thought they were working on the runic system so items would be made more balanced to the runic. If every item is craftable and each one could be produced by a runic then new formulas could be created to use runic.

    For example: If you have a set number of spawn in the dull copper range, then the same items found on loot would be struck by the dull copper hammer. Same with leather items and tinker, etc...

    So, then it would be a matter of deciding what monsters use what runics to decide loot drop. Instead of using randomn number it would use formula runic then create loot.

    So, if more formulas were created for runics, so there could be a wider range of formulas used this might stream line the code because you are using one system to do two things.

    This may be kind of like, the randomn system works now.

    I just think that what NPCs wear and what spawn use should be hard written and drop as loot. Maybe remove the guess work altogether, limiting what is actually randomn. For example: killing a daemon will always give you the same loot except for one item, which would have one randomn property, rather than all of the loot being randomn.
     
  31. JC the Builder

    JC the Builder Crazed Zealot
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    3,154
    Likes Received:
    708
    Are they planning on renaming the Random Number Generator so it won't have the bad rap anymore? You know, give it a fresh start like they did with calling the new client Stygian Abyss.


    this question is a joke
     
  32. Tom_Builder

    Tom_Builder Slightly Crazed
    Stratics Veteran

    Joined:
    Dec 9, 2002
    Messages:
    1,396
    Likes Received:
    0

    While in doom, I got 3 jackel collars in a row, 1 ring of the vile, then 2 Aof's, and 3 frostbringers. All in that order. So it's not all that random, it gets stuck on one item. Which was nice till the frostbringers.

    Tom
     
  33. Maplestone

    Maplestone Crazed Zealot
    Stratics Veteran

    Joined:
    Jul 26, 2008
    Messages:
    3,657
    Likes Received:
    9
    A perfectly functional random number generator will produce streaks - and the human brain being what it is, we tend to remember the streaks. Ever since we looked to the heavens and started mapping constellations, we've had a hard time believing there aren't patterns in random distributions.
     
  34. Basara

    Basara UO Forum Moderator
    Moderator Professional Wiki Moderator Stratics Veteran Stratics Legend Campaign Supporter

    Joined:
    Jul 16, 2003
    Messages:
    8,457
    Likes Received:
    582
    Except, Maplestone, when you can use probability analysis and show items so far off the curve that the probability of the incidence is below 0.00000001 - and you have happening in multiple experiments multiple times, it's pretty obvious something is wrong, and the premise that the "die" used for the experiment is a "fair" one pretty much goes out the window.

    Besides, it's a known fact in computer science that you can't make a "fair die" with a computer "RNG" (which is why they are technically referred to as pseudo-RNGs), you can just make more and more complicated algorithms to try to make them less biased.

    Sometimes Patterns aren't - but sometimes they are.

    After all, it is quite possible for a pseudo-RNG to be fair, over 10s of millions of tests, but if you look at arcs of 1000 (or even 100) consecutive samples (as opposed to ones picked at random, which is what is used for analysis normally), you'll see small scale streaking. The fact that streaking is happening at all levels of the testing range ends up being lost in looking at the random sampling.

    Think of it like looking at the mean level of water below a dam with a hydro-electric plant that only runs 4 hours on, 4 hours off. Sure, it will average "x" feet, consistantly, but any stretch of level samples (as opposed to random samples taken through the day and night), is almost certain to read wildly all-above or all-below the mean, unless the stretch occurs shortly after a startup or shutdown of the water flow to the turbines (in which the patterns are likely to be chaotic, and still show an ascending or descending curve).
     
  35. Dermott of LS

    Dermott of LS UOEC Modder
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    5,320
    Likes Received:
    528
    ...

    My professor in my computer engineering 5 years ago kept on explaining how RNG function we used writing programs is actually generating "random numbers" following a "pattern"... thus not truely random but yet random in someways.


    Ahh... Chaos Theory... I remember it well.
     
  36. Maplestone

    Maplestone Crazed Zealot
    Stratics Veteran

    Joined:
    Jul 26, 2008
    Messages:
    3,657
    Likes Received:
    9
    Most of the stories/claims I see on U.Hall fill me with great skepticism. For example, for something like strings of artifact drops to be caused by RNG means that somehow the artifact drops have to have its own seed separate from the RNG rolls for combat. So I tend to err on the side of believing people are seeing patterns in the noise and are coming to vent about RNG the way people often come here to vent about some template that just beat them in PvP.

    That said, despite my default skepticism, I can't rule out badness. Although 8x8 was sorta before my time, it sounds suspicously like a very crudely implemented algorithm that used seeds tied to a character and map location offset by a counter, so the precident for wonky, abusable algorithms seems to be there.

    I will certainly be eager to read what Draconi has to say :)
     
  37. Basara

    Basara UO Forum Moderator
    Moderator Professional Wiki Moderator Stratics Veteran Stratics Legend Campaign Supporter

    Joined:
    Jul 16, 2003
    Messages:
    8,457
    Likes Received:
    582
    My experiments were done in the crafting venue (more instances to test), and I used an online binomial probability tool from Vassar University, to do the approximations of the results if the test was "fair".

    Some of the Z-scores I got from tests routinely fell in the 4-10 range (we're talking MAJOR outliers); sometimes as high as a Z-score in the 20s or 30s.
     
  38. Maplestone

    Maplestone Crazed Zealot
    Stratics Veteran

    Joined:
    Jul 26, 2008
    Messages:
    3,657
    Likes Received:
    9
    *burns through 6 hammers worth of daggers with skill locked at a 50% chance.*

    successes/charges (and % chance of being this far or further from a 50-50)

    30/64 p=71%
    21/41 p=100%
    13/28 p=85%
    25/44 p=45%
    27/57 p=79%
    18/27 p=12%

    Not a huge sample, but it's right about what I would expect to see on a perfect random number generator ... so I fear I still remain skeptical (but still willing to be convinced), pending your recommendations for a more detailed test method I could run :)
     
  39. NuSair

    NuSair Babbling Loonie
    Stratics Veteran

    Joined:
    May 21, 2008
    Messages:
    2,989
    Likes Received:
    999
    In programming, there are simple functions built into the premade libraries (in c++ for example, it's in the cstdlib library) for generating a random number.

    Usually the base random function (called rand oddly enough) is used in conjunction with srand (psudo rand) and is used with time (found in the ctime library).

    Generally what happens is you use srand((unsigned)time(0); or something similar to generate a base number, that's the only time you call that function and then use rand to generate random numbers from there.

    The general error with this way of determining a random number is that, in general, the results are predictable. If you run just the rand function with the time modifier you will ALWAYS get the same numbers. This was done on purpose to help programmers debug programs. So, if a program errored out, you could find out what number(s) caused it to do so.

    Which is why when you add time to the fuction call, it gives it the appearance of being a 'random' number when it's not.

    Usually what will happen is that when you want a random number from 1 to 100, you'll generate a random number and then use modular division to get the result you want, which really isn't a good way to get a random number.

    Ok, anyway...

    going to go lay back down for my shot of cortisone in my back in the morning. :(
     
  40. Farsight

    Farsight Crazed Zealot
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    3,191
    Likes Received:
    36
    More fun with probabilities:
    A friend has just burned a heartwood fletcher kit. From that kit, 8 of the 15 bows had the "balanced" property. If everything was fair, the odds of that happening (according to the Binomial Probabilities page) is approximately 0.02%. That's 2 times in 10,000.

    I once scored 5 Windsongs in a row (in less than an hour, actually) at Miasma. According to the same source, the odds of that happening is less than 1 in 3 million.

    On a different day, I scored 4 Raed's Glory. The odds of that are much better, about 1 in 160,000.

    This sort of thing happens to me ALL THE TIME. If I play, I always run into something that is exceedingly rare if the RNG works the way it should. (my favorite was 3 brave knight katana on 3 Tokuno Spawns in a row with 8-10 people working each)

    But I accept this kind of thing as being a part of UO. In fact, I've grown to depend on them in some situations (Strong box quests for example. If in the first two quests, I get no items with 4 or 5 properties or all low intensities, I presume it's pointless to continue).

    In fact, if the RNG didn't work the way it did, UO will have lost something that makes it UO in my mind.
     
  41. Jhym

    Jhym Guest

    This is all moot without knowing how they've implemented the actual calls on the server.

    If they implemented it such that each individual character running is a process, and each process can access its own individual RNG call with its own seed, then we could likely say that yes, the RNG could have streaks that should be noticable and reproducable.

    However, if they implemented it as a single queue at the server level that every process pulls from, it would have a single seed and any streaks YOU would see would STILL BE RANDOM. This is because you are seeing "grabs" at intervals, not sequentially.

    Until we know this difference, we can't determine if the routine is working as intended or not.

    It also can show up as streaks if the method they are using to CONVERT the underlying bits to numbers is flawed or otherwise biased -- converting a 64-bit random number to 1 out of 100, 100 times, means you should get 100 random numbers according to human thought. However, for that size differential (64 bit to ~7 bits) you may get all 1's or all 100's. Even if they are just pulling off the last 7 bits to make a number you still can have issues -- the RNG could generate thousands of random numbers that have the same last 7 bits.

    Ideally for online games you'd put together a RNG generator server -- the only purpose of it would be to generate continual 64-bit numbers and then convert them to individual "dies" in a standard process that attempts to be non-biased and is easily modified if it is not. To be even more "random" you could have 100 processes all generating numbers, and another process that picks which process to pull a number from before it converts it to be used.

    But even if you had racks of 10000 machines pulling random numbers and pumping them out you'd still get stupid humans complaining that they whiffed fighting an ettin as a legendary swordsman or that they received the same property eight times in a row crafting, even though the machines still pulled completely random numbers.
     
  42. Harlequin

    Harlequin Babbling Loonie
    Stratics Veteran

    Joined:
    Jun 11, 2008
    Messages:
    2,716
    Likes Received:
    32
    A couple of observations to add -

    When multiple people get an artifact drop at the same time, they always get the same artifact.

    So the RNG that determines what artifact you get is based on a system seed (or maybe the mob's seed) and not the seed tied to your character (if this exists at all, but see next observation below).

    During the period when 8x8 was still working, the observation is that different 2 characters training the same skill do not get a skill gain in the same 8x8 grid. Suggesting that there is a seed tied to the character as well, at least for skill gains.
     
  43. Maplestone

    Maplestone Crazed Zealot
    Stratics Veteran

    Joined:
    Jul 26, 2008
    Messages:
    3,657
    Likes Received:
    9
    to me, anecdotal stories are worthless as a test - people always remember/talk about the streaks ( and you expect streaks to happen randomly), not the thousands of times an average result happened.

    hmmm ... I seem to have set myself up as the designated doubter to be proven wrong :)
     
  44. Spellbound

    Spellbound Lore Keeper
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    808
    Likes Received:
    85
    One area of interest that I'm curious about is related to whether a character has a base luck value that differs from others in his/her guild, or even with other characters on the account. Some of my characters always get the boobie prize, and few seem to more frequently hit the jackpot, but they all pale to a guildmate who's head we all try to rub for good luck. Her character outshines all in our guild. She gets "More and Better" everything! Not sure if this is related, but there was a short time span where all of our characters had some gibberish showing at the bottom of our character profiles. Did this set our base luck and skill gain rates?
     
  45. Mairut

    Mairut Guest

    oh, ok. Tyvm!!

    I see now that it was in the intro post >.< I'm just a little goofy like that sometimes :p lol
     
  46. Cogniac

    Cogniac Grand Inquisitor
    Stratics Veteran

    Joined:
    Nov 21, 2006
    Messages:
    4,322
    Likes Received:
    164
    Here's a question request:
    Could we get some algorithm pseudocode? (Real pseudocode, not "1. You give it a seed. 2. It generates a random number.")
     
  47. Lefty

    Lefty Lore Keeper
    Stratics Veteran

    Joined:
    May 17, 2008
    Messages:
    894
    Likes Received:
    67
    Answer this - Bushido warrior - 120 swords, 120 Parry, 45 DCI (60 real) 45 HCI keeps getting Auto hit by Archers who have hit lower defence, hit every time on the same target after the effect supposedly worn off? Seems like you can turn the light on, but not off.
     
  48. Maplestone

    Maplestone Crazed Zealot
    Stratics Veteran

    Joined:
    Jul 26, 2008
    Messages:
    3,657
    Likes Received:
    9
    Why would we want that? So that an exploit can be engineered?
     
  49. Vyal

    Vyal Guest

    rnd*1000 < rnd*250 then give item else nothing
    Hows that for ya?
     
  50. JC the Builder

    JC the Builder Crazed Zealot
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    3,154
    Likes Received:
    708
    If they want to solve their RNG problems they would have to build something like this: http://gamesbyemail.com/News/DiceOMatic

    For true random roles anyway. It might be worthwhile for a MMO company to do so.