The Random Number Generator
Interesting thread.. I sincerely think it would require a BOATLOAD of time spent to figure out what the factors all are even if the game uses a pseudo RNG. However as far as Im concerned, it works fine. Sometimes I get lucky. Sometimes I dont..
That being said, out of the list of possible pseudo RNGs from wikipedia,
Pseudorandom number generators (PRNGs)The following algorithms are pseudorandom number generators:
Blum Blum Shub
Inversive congruential generator
ISAAC (cipher)
Lagged Fibonacci generator
Linear congruential generator - the most common type in computer programming languages
Linear feedback shift register
Mersenne twister
Multiply-with-carry
Park–Miller random number generator
Maximal periodic reciprocals
Well Equidistributed Long-period Linear
Xorshift
My guess is that NCSoft is using
Lagged Fibonacci generator
based on the way I feel in a raid or on the hill in the ITF !
Virtue Server Forever !
Pure White Lightning - Level 50 Electric Brute
Purple Drop - work in progress Axe/Shield brute
Blue Icefall - Level 50 Ice Tank
@Blue Lava
Based on my own observations by playing this game since May of 2004, I'm pretty confident that the game's random number generator is a software routine.
|
I would post the fully-expanded decimal representation of 2^19937-1 here, but it's 6002 digits long.
MT is not cryptographically secure, but it doesn't need to be. Your recommendation for a hardware RNG would lead to feasibility for implementing a CSPRNG in the game based on the entropy of the input from the hardware RNG, but again, CSPRNG is way over the top for random numbers in a video game.
http://www.fimfiction.net/story/36641/My-Little-Exalt
Well, a lot of players on this forum are really keen on increasing their sense of immersion, and they all want even more changes into the game's appearance.
In such a light, it just seems odd to me that those same players would not care about how efficient the game was at producing random numbers. I mean, if this game was pencil-and-paper, would you be so thoughtless as to not care if the dice were broken and/or weighted?
And those hardware solutions are not exactly bank-breaking. Particularly for an entity as big as NCSoft.
EDIT:
If you look again at the link you provided, MT19937 has a period of 2^19937-1. The pattern you think a player might look for is 2^19937-1 numbers long. Even if everyone on the server is simultaneously farming -1/x8 24 hours a day, it will take months (at least) for the pattern to repeat. And that's assuming all of the players are helping to churn through the RNG pattern at once, and then how does this mythical RNG tracking player know the results from everyone else? |
I mean, if you're OK with that, that's fine. I just figured, you know, this is everyone's most favorite game, at least according to the more vociferous posters on these boards; you'd think they'd be clamoring for higher quality features, but what do I know?
I mean, if this game was pencil-and-paper, would you be so thoughtless as to not care if the dice were broken and/or weighted?
|
How long has the game been online now? How many people have played it in that time, and how many still are? That pattern has most certainly repeated several times by now.
|
Put simply, you're not going to notice the pattern unless you apply various analytical tools, and even then you're only going to point out the existence of a pattern. I don't think MT passes the next-bit test, so you could conceivably predict the next output from the rand() function given enough data. However, if the same random is used for multiple players, or for outputs you can't directly measure (easy example: the object produced by Propel), that knowledge isn't enough to attempt to exploit it.
For a short time, there was a bug on one of the maps where you would get the exact same drops, every time. But that's been fixed. Thanks to the help of players knowledgeable in the required analysis methods, the developers have closed that bug, and it shouldn't happen again.
http://www.fimfiction.net/story/36641/My-Little-Exalt
Not advocating wholesale rebuilding of the RNG or anything like that. But...
I have been wondering recently what testing, if any, goes into making sure that the RNG is working properly. Do the devs datamine drop rates or hit rates or anything of the sort?
Yes, statisical clustering and confirmation bias exist and my rational brain tells me that streaks are subjective. Still, every time someone comes on and complains about RNG-based problems, that suspicious part of my lizard brain pipes up and wonders if the RNG is really WAI.
Because there's a natural and not-unfounded tendency to disregard reports of biased outcomes when they crop up, it can take a lot of testing by the player-base to find real problems. And usually they have to be so blatant that everyone notices.
IIRC, the last problem with drop rates was only discovered because Castle or someone on his team just happened to find an uninitialized variable in the code. Nobody even suspected there was a problem because, well, streaks happen. It wasn't until the bug was pointed out to the player base and people started looking for it that the perception of the problem appeared.
Just a thought...
Do the devs datamine drop rates or hit rates or anything of the sort?
|
We do know that Castle created [The I Win Button] power in I9 to test drop rates. Run all over the map, spawning all of the critters, and then instagib all of them and check how many recipes/salvage you get.
http://www.fimfiction.net/story/36641/My-Little-Exalt
Yes, though I can't say to what extent. (Arcanaville probably tests such things much more thoroughly than most of the devs know how to, and for free at that.)
We do know that Castle created [The I Win Button] power in I9 to test drop rates. Run all over the map, spawning all of the critters, and then instagib all of them and check how many recipes/salvage you get. |
11 * 4283.59 Special damage over 10.50 seconds ((target = critter) and (source accesslevel > 9)) [Ignores Enhancements & Buffs] [Non-resistable] |
"You don't lose levels. You don't have equipment to wear out, repair, or lose, or that anyone can steal from you. About the only thing lighter than debt they could do is have an NPC walk by, point and laugh before you can go to the hospital or base." -Memphis_Bill
We will honor the past, and fight to the last, it will be a good way to die...
IIRC, the last problem with drop rates was only discovered because Castle or someone on his team just happened to find an uninitialized variable in the code. Nobody even suspected there was a problem because, well, streaks happen. It wasn't until the bug was pointed out to the player base and people started looking for it that the perception of the problem appeared.
|
IIRC, the problem did indeed stem from an uninitialized variable, though.
Arc#314490: Zombie Ninja Pirates!
Defiant @Grouchybeast
Death is part of my attack chain.
Unless there's been another one since, the last problem with drop rates was discovered by players, many from the Market forum, who devoted a *lot* of hours to testing and investingating, including writing software to perform statistical analysis of the large amounts of drop data collected (DropStats). And even with cast-iron statistical evidence, it was very difficult to persuade the devs that it wasn't a 'perception bias' and they should take a closer look.
IIRC, the problem did indeed stem from an uninitialized variable, though. |
Still, it supports the point I was trying to make. If the RNG had some sort of more subtle bug in it, we would be unlikely to know about it because player reports in that regard tend to be discounted. It is far easier for the devs to use their datamining tools to find such trends from the top down.
I'm not sure how the RNG works, but I know it can be VERY streaky. Sometimes I'll run an entire mission rolling mostly 90+ to-hit rolls, missing half of my accuracy-capped attacks, and other times I'll run entire missions with crap accuracy and never miss anything because the RNG keeps rolling numbers in the 40s and 50s.
In fact, if I didn't know better, I'd say Shard drop rate is hugely boosted for the first few Shards after you unlock your Alpha slot. Why? Every time I unlock my Alpha, I earn one or two Shards within the next couple of missions, but I don't earn any MORE than that over the next couple of days. I'm pretty sure Shard drop rate is not variable, which means the RNG is giving me odd streaks.
Samuel_Tow is the only poster that makes me want to punch him in the head more often when I'm agreeing with him than when I'm disagreeing with him.
|
I've often thought about actually testing to see if the RNG is working properly, because I'm always shocked at how often I miss things when I have a 75-85ish% chance to hit (mostly while level, pre-SOs). I always monitor my Last Hit Chance, and pay relatively close attention to my hit rolls, and while I know intellectually that any randomized system can be very streaky, and that you simply tend to notice misses more than hits, I can't help but occasionally stare at my screen in complete disbelief at my horrible luck.
Frankly though, I'm just too lazy to do the testing. So I just shrug, sigh and hope that if there is something wrong Arcanaville will figure it out.
I've often thought about actually testing to see if the RNG is working properly, because I'm always shocked at how often I miss things when I have a 75-85ish% chance to hit (mostly while level, pre-SOs). I always monitor my Last Hit Chance, and pay relatively close attention to my hit rolls, and while I know intellectually that any randomized system can be very streaky, and that you simply tend to notice misses more than hits, I can't help but occasionally stare at my screen in complete disbelief at my horrible luck.
|
One reason I rarely care about hit chance over 90% is because I'm convinced the RNG intends to screw with me, and all that really matters is being in the highest streakbreaker bracket.
Samuel_Tow is the only poster that makes me want to punch him in the head more often when I'm agreeing with him than when I'm disagreeing with him.
|
Don't forget the randomized rewards venders:
Get 10 Random Recipes from a merit and have a duplicate.
Took 26 "Random" 26-40 Commom Tech Salvages to get 1 circuit board(There are 6 different ones in that category)*
*Still better than paying the market prices on most middle tier common salvage.
@Blood Beret(2)Twitter
I am a bad speeler, use poorer grammar, and am a frequent typoist.
MA ArcID: 1197
You have enemies? Good. That means you've stood up for something, sometime in your life. Winston Churchill
Rabbits & Hares:Blue (Mind/Emp Controller)Maroon (Rad/Thermal Corruptor)and one of each AT all at 50
MA Arcs: Apples of Contention - 3184; Zen & Relaxation - 35392; Tears of Leviathan - 121733 | All posts are rated "R" for "R-r-rrrrr, baby!"|Now, and this is very important... do you want a hug? COH Faces @Blue Rabbit
Arc#314490: Zombie Ninja Pirates!
Defiant @Grouchybeast
Death is part of my attack chain.
Whether it's trying to get a shard, a particular bit of rare salvage, or a particular Purple recipe (or trying to get one at all!), a lot of players like to lay blame on the game's random number generator for hating them (or in some cases, loving them).
Based on my own observations by playing this game since May of 2004, I'm pretty confident that the game's random number generator is a software routine. As such, being an algorithm, that makes it closer to being a pseudorandom number generator. I'm sure that if you were keenly observant (and had a heck of a lot of time on your hands), you'd be able to discern the pattern and be able to use it to your advantage.
I'd suggest that the servers each be retooled to use their own hardware random number generator. Something perhaps like this device, that uses the unpredictability of certain measurable physical phenomena on which to create a random number as output.
Now, it's true that a hardware random number generator might be too slow for the purposes of an MMO server. If that's the case here, then I'd suggest that a hardware random number generator could still be used to create a new seed value for the software random number generator at regular intervals.
What do you think?