• Hail Guest!
    We're looking for Community Content Contribuitors to Stratics. If you would like to write articles, fan fiction, do guild or shard event recaps, it's simple. Find out how in this thread: Community Contributions
  • Greetings Guest, Having Login Issues? Check this thread!
  • Hail Guest!,
    Please take a moment to read this post reminding you all of the importance of Account Security.
  • Hail Guest!
    Please read the new announcement concerning the upcoming addition to Stratics. You can find the announcement Here!

Draconi working on RNG any questions

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
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 :)
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
lol I already posted asking exactly how does it work and will they be making changes to it!
 
Y

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)
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
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)
posted!
 
Z

Zodia

Guest


^^^
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?
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
lol sorry cant post pics in the comment sections of facebook but that is funny!
 

Bomb Bloke

Lore Keeper
Stratics Veteran
Stratics Legend
It's inaccurate, though. The UO RNG has lots more dice with the same number on them...
 
M

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.
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
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.
Posted ... and you are welcome
 

JC the Builder

Crazed Zealot
Stratics Veteran
Stratics Legend
Campaign Benefactor
It's inaccurate, though. The UO RNG has lots more dice with the same number on them...
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.
 
G

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.
 

MalagAste

Belaern d'Zhaunil
Alumni
Stratics Veteran
Stratics Legend
UNLEASHED
Campaign Supporter
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.....
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
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.
posted
 

Harlequin

Babbling Loonie
Stratics Veteran
Stratics Legend
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
 
S

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?
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
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?
posted
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
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
posted
 

Storm

UO Forum Moderator
Alumni
Stratics Veteran
Stratics Legend
Awards
1
ok I will be off of face book the rest of the night!
 
C

Connor_Graham

Guest
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?
 

Maplestone

Crazed Zealot
Stratics Veteran
Stratics Legend
What does RNG stand for? :p
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)
 
D

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.
 

PsychoKinetic

Journeyman
Stratics Veteran
Stratics Legend
I believe its using system time and the characters coordinates in-game together to generate the rolls.
 

HunterXHunter

Visitor
Stratics Veteran
Stratics Legend
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.
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.
 
Z

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.
 

JC the Builder

Crazed Zealot
Stratics Veteran
Stratics Legend
Campaign Benefactor
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
 

Tom_Builder

Slightly Crazed
Stratics Veteran
Stratics Legend
Is it random?

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
 

Maplestone

Crazed Zealot
Stratics Veteran
Stratics Legend
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.
 

Basara

UO Forum Moderator
Moderator
Professional
Governor
Stratics Veteran
Stratics Legend
Wiki Moderator
UNLEASHED
Campaign Supporter
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).
 

Dermott of LS

UOEC Modder
Stratics Veteran
Stratics Legend
...

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.
 

Maplestone

Crazed Zealot
Stratics Veteran
Stratics Legend
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.
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 :)
 

Basara

UO Forum Moderator
Moderator
Professional
Governor
Stratics Veteran
Stratics Legend
Wiki Moderator
UNLEASHED
Campaign Supporter
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.
 

Maplestone

Crazed Zealot
Stratics Veteran
Stratics Legend
*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 :)
 

NuSair

Crazed Zealot
Stratics Veteran
Stratics Legend
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. :(
 

Farsight

Crazed Zealot
Stratics Veteran
Stratics Legend
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.
 
J

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.
 

Harlequin

Babbling Loonie
Stratics Veteran
Stratics Legend
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.
 

Maplestone

Crazed Zealot
Stratics Veteran
Stratics Legend
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 :)
 

Spellbound

Lore Master
Stratics Veteran
Stratics Legend
UNLEASHED
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?
 
M

Mairut

Guest
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)
oh, ok. Tyvm!!

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

Cogniac

Grand Inquisitor
Stratics Veteran
Stratics Legend
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.")
 

Lefty

Lore Keeper
Stratics Veteran
Stratics Legend
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.
 

Maplestone

Crazed Zealot
Stratics Veteran
Stratics Legend
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.")
Why would we want that? So that an exploit can be engineered?
 
Top