It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
low rated
Title says it all.

I'm finding the base d20 rolling to be seriously skewed to the low end. Recently, I've been averaging an 8 in base rolls over the last few days, and I have found 2 1's in a row at least a few times over the last 2 days (mathematically the chance of rolling 2 1's in a row is 1 in 400).

I'm not taking any "you're just unlucky" answers. Having spent years studying mathematics, I know bulls--- when I see it, and I can verify with near 100% certainty that the d20's are rigged.

If I see my character missing or failing a suspicious number of times, I closely watch the rolls on the lower left window and keep rough statistics. In particular:
-rolling a 1 is roughly 3x as likely as rolling a 20 (should be equal chance with a fair d20)
-rolling an 8 or below is roughly 2x as likely as rolling over 8 (should be 2/3)
-rolling over a 15 is 1/5 as likely as rolling 15 or under (should be 1/3)
---------------

Anyone have a patch for these problems? Any one of these solutions would work.

Fix the RNG:
-A proper RNG. I recommend the Mersenne Twister algorithm.
-Adaptive RNG which maintains statistics and artificially skews the number rolled up/down if it detects anything abnormal.
--Example 1: if you roll 1 twice in a row, you're automatically blocked from rolling another 1 on the next 20 rolls. If you roll 20 twice in a row, you're blocked from rolling another 20 on the next 20 rolls.
--Example 2: Maintain average of rolled numbers. If the statistic average is below 8 with 95% confidence, add 1 to all rolls. If the statistic average is below 6 with 95% confidence, add 2 to all rolls. If the statistic average is above 12 with 95% confidence, subtract 1 from all rolls. If the statistic average is above 14 with 95% confidence, subtract 2 to all rolls.

Fix broken mechanics:
-Mod containing a set of extended console commands to use as "referee tools" (similar to how a sports referee calls timeouts and assigns penalties when a side is caught cheating)
-Mod that completely removes default behavior on 1 and 20 rolls: a 20 is no longer a guaranteed success and a 1 is no longer a guaranteed fail
No posts in this topic were marked as the solution yet. If you can help, add your reply
ROFL!

You seriously tracked every single die roll the computer made over days while playing a game? Did you pause and record every sword swing, every saving throw?

I think you should consider you might have OCD.

I have played NWN extensively for years (since 2003), I have never observed a problem, but I don't have OCD.
Here's the results of me bashing relentlessly Pavel in the prologue just to check out my character's rolls:

7,15,1,10,19,10,20,15,4,3,13,15,4,15,16,3,6,6,4,16,19,18,13,20,5,5,6,17,14,20,5,20,20,20,18,4,9,17,17,16,13,17 ,15,18,1,4,13,2,1,1,6,3,18,14,18,4,20,8,11,17,6,1,5,12,15,8,19

A sample of 67 values in total. Could be more, I know, but I don't have all day to hit Pavel continously. The mean value from these is 11.27, which is quite close to the expected value (10.5), so everything's pretty much alright.

Note that I actually rolled two same values in a row more than once - better yet, I once rolled three 20s in a row! Amazing, isn't it? It's almost as if the dice were rigged to the high end, actually...

The trick with randomness is that you can never be quite sure if it isn't rigged, but you should know that if you have been studying maths for several years now.

So take my answer or throw it into your trash can, but...
You're just unlucky.

What's funny is that what you're doing for the most part in your post is complain that the RNG is rigged, while one of your solutions to this apparent problem is rigging it (like restricting the number of times a value can be rolled in a row).
Post edited December 19, 2016 by Taro94
Equal chance does not mean equal amount. There is always a possibility that you can have 10 ones in a row and no 20s at all. It is just bad luck. The system does not think like "oh that guy had been having 1s and 2s often, lets give it some 20s now".
avatar
Engerek01: Equal chance does not mean equal amount. There is always a possibility that you can have 10 ones in a row and no 20s at all. It is just bad luck.".
What I'm seeing here is an utter lack of knowledge of probability and statistics.

Equal chance doesn't require equal amount. In statistics, there is the concept of expected value, variance, and standard deviation.

In particular, you start with an assumed distribution (in this case, numbers 1 through 20 with supposedly "even" distribution), then test the observed average versus the expected average (10.5). Depending on the number of dice rolls (the sample size), and the average, there are mathematical formulas for the "confidence" that the dice roll is fair or skewed. For example, if the average observed value is half a standard deviation from 10.5 with a reasonable sample size, then the dice roll is likely fair. On the other hand, if I'm seeing a full standard deviation below the expected average with a good sample size, then I can say with excellent confidence that it's rigged or badly built.

If you have 10 1's in a row, the chance of that is 20^-10 = under 1 in 10 trillion (much lower than winning a lottery jackpot). If that happens, you can say with infinitesimally lower than absolute confidence (mathematically) that the dice roll is rigged.

For reference (I probably should have mentioned this) I'm seeing this problem with the original NWN, not NWN 2.

Further superstitious garbage about bad luck and any further posts showing a clear lack of understanding in basic probability and statistics will be ignored from this post on.
avatar
DivisionByZero.620: Further superstitious garbage about bad luck and any further posts showing a clear lack of understanding in basic probability and statistics will be ignored from this post on.
They apparently are ignored already, because I rebutted your apparent results with my own. And I'm versed well enough in probability and statistics to know what expected value is, even versed well enough to use my results' average value's proximity to it as a proof that the dice are not rigged. The dice are fair, you're creating a problem where there is none.
Post edited December 19, 2016 by Taro94
avatar
Taro94: -snip-
Were you testing on NWN1 or NWN2? Also, which edition do you have?

They could have screwed up the entire RNG based on the edition.

see this thread for further RNG shenanigans:
https://www.gog.com/forum/neverwinter_nights_series/nwn_1_diamond_edition_lowlevel_unique_item_chests_rigged_against_martial_melee_weapons
avatar
Taro94: -snip-
avatar
DivisionByZero.620: Were you testing on NWN1 or NWN2? Also, which edition do you have?

They could have screwed up the entire RNG based on the edition.

see this thread for further RNG shenanigans:
https://www.gog.com/forum/neverwinter_nights_series/nwn_1_diamond_edition_lowlevel_unique_item_chests_rigged_against_martial_melee_weapons
NWN1, Diamond edition, the one that comes from GOG. But I'm 100% certain that no changes to the RNG were made in any edition or patches, not even in mods. RNG is the hardest kind of hardcoded in NWN, I think, plus no one has any real reason to mess with it, so you won't find any modifications or differences between versions.

You should just load up the prologue and bash poor Pavel like a hundred times and note down the results, like I have. You're unlikely to get an average much different than mine (or than the expected value, to be more precise).
Post edited December 19, 2016 by Taro94
avatar
DivisionByZero.620: What I'm seeing here is an utter lack of knowledge of probability and statistics.
Actually what I see is that Tarot and Engerek seem to understand better than you.

From your first post:
avatar
DivisionByZero.620: If I see my character missing or failing a suspicious number of times, I closely watch the rolls on the lower left window and keep rough statistics. In particular:
This is ridiculous level of selection bias, for someone putting down others understanding of statistics.

Taro did a proper non biased test, and discovered no real bias. He was a bit higher than expected, but I bet if he tested longer it would pull closer to the expected average, but I don't blame him for not wasting more of his time on this.

OTOH, What you are doing, is ridiculously biased, when you see your character miss a lot, then you record values, and low and behold they are low!

It's almost as if you get lower number when you miss. ;)
avatar
PeterScott: -snip-
I've actually been doing random inspections on the RNG (instead of just inspecting when there are problems - a large stretch of numbers with no 1's, or 2 20's in a row is grounds for inspection) and these random inspections also confirmed my findings.

Obviously you are invading both of my discussions to troll. You have contributed nothing, no solutions, no patches, no mods, nothing useful in any way.
Not trolling, just correcting nonsense.

BTW, to save some time swinging swords and slavishly recording, you can roll dice in the NW console, and you can specify how many times to roll them (though the amount of times is an 8 bit value, so max of 255).

10 Rolled Expected av Value: 105
Greatest Low deviation: 36% low
Greatest High deviation: 11% high

d20 10: 117
d20 10: 67
d20 10: 98
d20 10: 103
d20 10: 113

100 rolls Expected av value: 1050
Greatest Low deviation: 6.5% low
Greatest High deviation: 8.1% high

d20 100: 1135
d20 100: 988
d20 100: 1118
d20 100: 1110
d20 100: 982

255 (max allowed) rolls Expected av value: 2677.5
Greatest Low deviation: 4.0% low
Greatest High deviation: 4.5% high

d20 255: 2664
d20 255: 2571
d20 255: 2716
d20 255: 2671
d20 255: 2797

Total for these 5 rolls: 13419, expected average Value 13387.5, Deviation: 0.23% high.

It should be obvious to anyone (OP excepted), that the more you roll, the more it is zeroing in on the expected average value. The D20 function is fair.

Some people, while trying to intuit statistics, fail, by believing that some small section of numbers is too improbable, because it should be more evenly distributed. This is nonsense. That isn't what statistics says.

You need larger number sets to really asses if dice are unfair. As can be seen from the above, the bigger your sets, the more they converge on expected average. At small numbers bigger swings are not only allowed, they are expected, so you can't assess fairness from small numbers.

I remember seeing a statistics professor that would get half the class to flip a coin and the other half to fake it. He could with a high degree of accuracy tell which ones faked it, because most people tend to make sure their results were more evenly distributed than a real coin flip would be for low numbers.

Mix in a healthy dose of selection bias(missed too many times in a row), and you have a recipe for this kind of sophomoric mistake.
The game's code seems to be doing this for dice rolls(at least, the Linux server binary is):

rand() % x + 1;
where x is the number of sides on the die. From what I've read, this is actually a bad way to generate random numbers and will have less than perfect distribution. But probably not as bad as you are making it out to be.

EDIT: Ok, assuming RAND_MAX of 32,767(this value is system dependent) and a random enough rand() implementation then 1 through 8 have a ~5.0018% chance of rolling, and 9-20 have a ~4.9987% chance. Pretty insignificant difference.
Post edited December 20, 2016 by windwakr
avatar
Engerek01: Equal chance does not mean equal amount. There is always a possibility that you can have 10 ones in a row and no 20s at all. It is just bad luck.".
avatar
DivisionByZero.620: What I'm seeing here is an utter lack of knowledge of probability and statistics.
I have been giving probability and statistic lessons in university probably more than your age so please dont insult others because you dont know something properly. All these people here are much better at mathematics than you and trying to explain you with good will. But if you are not capable of opening your eye to reality, then you wont be able to learn it. I tell the same things to my mechanical engineering students. Stubborn people are doomed to stay ignorant.
---------------------------------

EDIT: I wrote a simple program to do a 1000 dice and count them. One of the results were like this.

Face Frequency
1 23
2 45
3 56
4 42
5 34
6 46
7 42
8 52
9 48
10 60
11 60
12 45
13 52
14 43
15 50
16 55
17 53
18 66
19 54
20 73

Would that mean that my program is rigged for 1s? Here is my code if you know a little bit of java. I can do the same in C++.

// ***** Random counter. It counts how many times each dice rolled.
int freq[]=new int[21];
for (int roll=1;roll<1000;roll++){
++freq[1+dice.nextInt(20)];
}

System.out.println("Face\tFrequency");
for(int face=1;face<freq.length;face++){
System.out.println(face+"\t"+freq[face]);
Post edited December 20, 2016 by Engerek01
avatar
Engerek01: [Pretend the previous post is here; omitted because the server doesn't seem to like quoting the entire post.]
I don't see the code where you actually calculate the random number (including the call to the standard library's RNG, if that's what you're using, or the code fore the RNG itself, if you wrote your own).

One game I've been playing lately, the NES version of Ultima 4, actually has a biased RNG when it comes to money in chests. The game generates a random number between 0 and 255, reduces it modulo 99, and adds 1; this yields a number between 1 and 99, but is weighted towards low numbers (the average is only about 40).

Source:
http://tasvideos.org/GameResources/NES/Ultima4.html
(See the section titles "Chest gold")
avatar
Engerek01: [Pretend the previous post is here; omitted because the server doesn't seem to like quoting the entire post.]
avatar
dtgreene: I don't see the code where you actually calculate the random number (including the call to the standard library's RNG, if that's what you're using, or the code fore the RNG itself, if you wrote your own).
nextInt(20) returns the random integer in the code. Which increases the array member number with that + 1 number.