Random Numbers Generator

given the large amount of people replying "it's RNG", to very legitimate claims of bad luck and lack of fairness and fun in the game - I feel a clarification about what a Random Numbers Generator is in Computer Science, is necessary:

there is no way to implement generation of truly random numbers in code right now.
and I doubt there'll ever be, because a "true RNG" will make encryption-based security truly impenetrable as just one nice possible use.

so what everybody - including GGG - does is implement increasingly better approximations to "true random", using increasingly more complex mathematical formulas.

changing the formula itself often requires completely re-writing a huge chunk of code, but luckily such a formula excepts parameters, which can change it's behaviour.

for example, what equipment modifiers like "increased quantity/rarity" do in Path Of Exile I imagine, is run the exact same RNG with parameter y instead of the default x.

I see no clear reason why things like crafting and enchanting should run RNG with the default parameters, thereby making the chance to craft 6 sockets or 5 links, the same as getting a high level unique to drop in game, for example.

yes, parametrized RNG can ruin the game both ways (player-frustration or player-cheating and item inflation) - but not if done just right.
it's a very difficult job to balance it correctly - make no mistake about it - but all you people who say "it's RNG" without really knowing what RNG is, should realize Path Of Exile is just a game. and games are supposed to be fun. a perfect mix of fun and effort to be exact.
risk and reward that has better odds than a Casino, who's sole purpose is to take your money.

make the game too frustrating - you lose huge amounts of players.
make the game too easy and rewarding - you lose huge amounts of players. including me.
Alva: I'm sweating like a hog in heat
Shadow: That was fun
Last edited by johnKeys on Mar 16, 2013, 4:57:54 AM
Last bumped on Jun 27, 2016, 8:19:26 AM
This thread has been automatically archived. Replies are disabled.
As far as I know nobody knows the actual distributions used in any of the places RNG is used.
Did someone say the one used in loot is the same as the one used in sockets?

The RNG is the least important thing basically. You can just roll a "random(0,1)" and then convert it to any distribution you like.
The distribution is what matters.
@gonzaw the key thing to understand is, random(0,1) isn't truly random. far from it.
the great Mathematician Georg Cantor proved the amount of real numbers in (0,1) isn't just infinite, but is actually equal to the amount of real numbers in total. that's 2^(amount of natural numbers). with the amount of natural numbers already being infinite.

just take a guess about how hard it is to roll 2^(infinity) numbers with equal distribution, when some of those numbers have a decimal representation which requires more computer memory than you'll ever be able to allocate.
not hard. impossible.
Pi is just one Transcendental real number, where it takes a supercomputer to find a "good enough" approximation. he has infinitely-many "brothers" in (0,1).

the way random(0,1) works depends only in how you implement it to work. the most common implementation I've seen, is rolling only numbers from the form 1/n, where n is a natural number in a finite space small enough for a computer to represent, like from 2 to 2^20 inclusive.
Floating Point can handle numbers like this, but it can still be "a bit" tricky. take 1/3 as a very good example.

and even then, running your random(0,1) both for loot drops AND socketing/linking in Path Of Exile is just wrong - because one is just pure luck, while the other is a key game mechanic which determines which skills you'll be able to use.
Alva: I'm sweating like a hog in heat
Shadow: That was fun
Last edited by johnKeys on Mar 16, 2013, 5:59:19 AM
So, to sum it up, distribution and RNG are opposites.
Frankly, I do not know if GGG uses computer-based RNG(i.e. a long enough sequence of non-periodic numbers) roll chromatics, links, etc. or if some distribution curve is implemented.
I doubt the latter, because that would require exhaustive and time-consuming testing to a degree that a small company like GGG most probably cannot perform.
Anyway, it will be impossible for GGG to fulfill the real demand of the noobs in this forum, which merely is:
A biased drop rate of uniques in their own favour, while the others still get crap.
My seeds are always terrible, I never get nothing good
S L O W E R
To the contrary; you can easily find random number generators that produce draws from various statistical distributions. You can even find generators that will let you specify a mean and a standard deviation, and then specify the distribution curve, whether it is single tailed, or dual, and so on and so forth. I should know; I have used them, as have many that have done software support in maths and sciences.

The observation that the RNG itself is not random, but is instead only pseudorandom, while correct, does not add anything here. If you were a computer scientist with a math background discussing actually implementing the generator, there would be all sorts of worthwhile discussions to have; however as a software person, consuming the generator, all one needs to know is that you should start with a good seed, preferably one that draws on randomness in some way. There are any number of ways to do that such that the seed is, for all intents and purposes, truly random.

I don't really understand what OP is trying to achieve by their post. Perhaps a better explanation of the post's intent is in order here.

As a side note, one can really unnecessarily perseverate on what is or isn't random. If you'd like to learn more about what I mean by this, you can play a game with me. In this game, I just now flipped a quarter, and placed it on my desk. What are the chances that it is a head?

Thanks, bye.

--C

Last edited by Courageous on Mar 16, 2013, 9:46:53 AM
"
Jwiz wrote:
So, to sum it up, distribution and RNG are opposites.
Frankly, I do not know if GGG uses computer-based RNG(i.e. a long enough sequence of non-periodic numbers) roll chromatics, links, etc. or if some distribution curve is implemented.
I doubt the latter, because that would require exhaustive and time-consuming testing to a degree that a small company like GGG most probably cannot perform.
Anyway, it will be impossible for GGG to fulfill the real demand of the noobs in this forum, which merely is:
A biased drop rate of uniques in their own favour, while the others still get crap.


they are not opposites if the RNG is done right. in my example of a simple 1/n RNG in (0,1), the odds of getting any specific number are always roughly 1:2^19. not much of a chance but still pretty fair and unbiased, and with uniform distribution.

implementing a RNG is indeed a very messy business involving a lot of math, optimization, approximations and testing.
this leads me to believe GGG simply took a proven, tested RNG and integrated it into their code.
in which case, it all comes down to what parameters their code gives it, and when.

if you read the last few lines in my OP, you'll see I'm against any kind of extreme - be it too few, unfair drops and enchanting, or too much drops and "too successful" enchanting.

I just think the parameters given to the RNG when calculating loot drops, should by no means be connected in any way to those given on attempted augmentations with socketing/linking orbs and the like.
the player should not be restricted by luck or random chance when trying to put his/her skill gems to good use.
Alva: I'm sweating like a hog in heat
Shadow: That was fun
"
I just think the parameters given to the RNG when calculating loot drops, should by no means be connected in any way to those given on attempted augmentations with socketing/linking orbs and the like.


As I've noted over in the RNG-itis thread, one method would be to put a counter on an item (e.g., "nAttemptedFusings") and when that counter reached a critical threshold, allow the fuse. While I am vague about what the threshold should be, by way of an example, it might work like this:

"If the odds of a 6L are 1:500, if the threshold reaches 1000, you get a 6L." That's a 2X threshold. I disavow what that threshold ought to be, and leave it to your imagination.

Using a number greater than 1X does have certain things going for it. For example, there is a risk that your attempted fusings might go on longer than you prefer. There is also a chance that they could occur early. Finally, the community has a clear signal of what to expect. It could even be documented.

This mechanic could be applied in a few other strategic locations, but is obviously not needed for most RNG draws. Areas to consider are unique drop recency, a few high end currencies (e.g. exalts, regals), fusings, and perhaps a few others. Not, most all else.
Sorry for being unprecise in my posts.
I meant so express that the intention of (true) RNG and distribution are opposites.
I am aware that starting with an inapt seed, you can get all sorts of distributions as opposed to a random distribution.

P.S.:
As a 'quarter' is not my native currency, I do not know whether there is 1 or 2 heads on it or none at all. ;-)
Supposing there is a head on one side while something else on the other and it is also a fair coin, the probability that it lands on head is 50% for each throw.
@Courageous I was trying to explain how a real pesudo-random number generator works in practice, and how you can't really blame RNG for "screwing you" if it's fair and as evenly-distributed as possible.
what you CAN and should blame is the parameters given to RNG when you did get screwed - and those parameters can and should be changed by GGG to make the game more fair, instead of one where everything is just down to pure luck, including the skills you get and how you use them.
it's something most trolls and "RNG purists" in this forum fail to realize.

this is the intent of my posts: GGG should tweak the parameters given to RNG in various situations.
make the game fun - instead of the current "Casino" situation where one wins and a thousand lose to the point where they can't play anymore - but not "too rewarding".
I believe you had a thread asking this yourself not long ago.

as for your game, if the quarter is fair (in terms of weight, and actually having two distinct sides) and you flipped it only once - the chance it is heads is equal to the chance it is tails = 50%. 1/2.

but surely you can agree that a situation where 20 virtual coins are tossed each time you use a jeweller's orb - and you get an extra socket only if 19 of them land on heads, and lose at least one socket otherwise - isn't in any way fair or logical.
it is however both fair and logical if the game uses such a "19 out of 20 coins" method to determine if the monster you just slain would drop a unique or not.
Alva: I'm sweating like a hog in heat
Shadow: That was fun
Last edited by johnKeys on Mar 16, 2013, 10:39:46 AM

Report Forum Post

Report Account:

Report Type

Additional Info