09-19-2019, 11:53 AM

Hello Fellas,

Wow, I stumbled upon this tool and I'm massively impressed by it. On my first approach to the tool a year ago I started using it and trying it out.

What I read here on the forum and what you even made a FAQ for, is the topic related to the dice. As our playing groups got some worries here as well, I digged a little deeper into it.

Quote from your FAQ:

"Are the dice conspiring against me?

Short answer: No. Long answer: The dice use the standard Java random number generation routines. You can find them described in the Sun documentation. The same routine is used for every dice roll in the game. These routines have been tested, and they behave as closely as possible to real dice as is possible on a computer. To put it another way, every time the virtual die is rolled, it stands a one-in-six chance of generating each number, one through six, and each roll is independent of previous rolls. "

What I understood (correct me if I'm wrong), is that you used the standard java random number generator, right?

Which is fair in the sense, that if your roll a 6 sided dice 6000 times, it will generate a fair output of:

1: 1005x

2: 1028x

3: 1027x

4: 989x

5: 994x

6: 957x

results.

If you now take 2 dice, the standard random, as it is a computer produces a fair share like

02: 500x

03: 500x

04: 500x

05: 500x

06: 500x

07: 500x

08: 500x

09: 500x

10: 500x

11: 500x

12: 500x

Which is fair, but not like in a real world, which made a lot of people here complain.

The reason is, that in the real world, the more dice you take, the more you get a gauss bell curve of results.

like for example:

02: 100x

03: 200x

04: 350x

05: 450x

06: 600x

07: 750x

08: 750x

09: 600x

10: 450x

11: 300x

12: 100x

Here is a nice article about this problem in java code:

https://dzone.com/articles/java-programm...e-random-0

Quote:

-----------

Different Kinds of Randomness

Uniform Distribution

The Uniform Distribution is what you get by default from java.util.Random (and its sub-classes - including the Uncommons Maths RNGs). The discrete uniform distribution says that there are a certain number of possible outcomes and each is equally likely. The obvious example is rolling a dice. You can get a 1, 2, 3, 4, 5 or 6 and no single outcome is more likely than any of the others. If you record the results of 6 million dice rolls you would expect to get pretty close to a million of each number.

The uniform distribution is useful for some problems, such as shuffling a deck of cards, but it is not a good choice for many other scenarios that don’t involve a set of equally likely outcomes.

Normal (Gaussian) Distribution

The Normal Distribution (also known as the Gaussian Distribution) is the familiar bell curve. It is a good model for many real world phenomena. In a normal distribution, the average outcome is more likely than any other outcome. A slightly above or below average outcome is almost as likely, and extreme outcomes, while still possible, are very unlikely.

An example of this would be the distribution of IQ test scores. Most people would achieve somewhere close to an average score (maybe slightly above or below), but a few people would achieve very low scores and a similarly small number would achieve very high scores.

The nextGaussian() method of the java.util.Random class provides rudimentary support for obtaining normally-distributed values. Uncommons Maths’ GaussianGenerator class builds on this, making it easy to create distributions with different means and standard deviations. The standard deviation parameter controls how spread out the values are. A low standard deviation means most values will be very close to the mean (on either side). A high standard deviation increases the likelihood that a value will be a long way from the mean.

GaussianGenerator is a wrapper around a standard RNG (you can use any of the Uncommons Maths RNGs, or even one of the standard Java ones if you so choose). Once you have created a GaussianGenerator by specifying a mean, standard deviation and source RNG, you can call the nextValue() method ad infinitum:

Random rng = new MersenneTwisterRNG();

GaussianGenerator gen = new GaussianGenerator(100, 15, rng);

while (true)

{

System.out.println(gen.nextValue());

}

If we were to generate thousands of simulated IQ test scores with this code, we would see that the vast majority of scores would be close to the average (100). Around 68% of the values would be within one standard deviation (15) of the mean (i.e. in the range 85 - 115), and approximately 95% would be within two standard deviations (between 70 and 130). These percentages are a well-known property of normal distributions.

The demo shows how the distribution of generated values compares to a theoretical normal distribution (the more values you generate, the closer the fit will be).

-----------

here is a Short demo about the results:

https://uncommons-maths.dev.java.net/demo/demo.jnlp

Do you think it would be possible to try this out? Like taking the code stated in the article and implement it in a test version? We would do some additional playtests then and see if the complaints vanish and I can finally force everybody in my group to use your great tool

Thanks

and long live the Dragon

Wow, I stumbled upon this tool and I'm massively impressed by it. On my first approach to the tool a year ago I started using it and trying it out.

What I read here on the forum and what you even made a FAQ for, is the topic related to the dice. As our playing groups got some worries here as well, I digged a little deeper into it.

Quote from your FAQ:

"Are the dice conspiring against me?

Short answer: No. Long answer: The dice use the standard Java random number generation routines. You can find them described in the Sun documentation. The same routine is used for every dice roll in the game. These routines have been tested, and they behave as closely as possible to real dice as is possible on a computer. To put it another way, every time the virtual die is rolled, it stands a one-in-six chance of generating each number, one through six, and each roll is independent of previous rolls. "

What I understood (correct me if I'm wrong), is that you used the standard java random number generator, right?

Which is fair in the sense, that if your roll a 6 sided dice 6000 times, it will generate a fair output of:

1: 1005x

2: 1028x

3: 1027x

4: 989x

5: 994x

6: 957x

results.

If you now take 2 dice, the standard random, as it is a computer produces a fair share like

02: 500x

03: 500x

04: 500x

05: 500x

06: 500x

07: 500x

08: 500x

09: 500x

10: 500x

11: 500x

12: 500x

Which is fair, but not like in a real world, which made a lot of people here complain.

The reason is, that in the real world, the more dice you take, the more you get a gauss bell curve of results.

like for example:

02: 100x

03: 200x

04: 350x

05: 450x

06: 600x

07: 750x

08: 750x

09: 600x

10: 450x

11: 300x

12: 100x

Here is a nice article about this problem in java code:

https://dzone.com/articles/java-programm...e-random-0

Quote:

-----------

Different Kinds of Randomness

Uniform Distribution

The Uniform Distribution is what you get by default from java.util.Random (and its sub-classes - including the Uncommons Maths RNGs). The discrete uniform distribution says that there are a certain number of possible outcomes and each is equally likely. The obvious example is rolling a dice. You can get a 1, 2, 3, 4, 5 or 6 and no single outcome is more likely than any of the others. If you record the results of 6 million dice rolls you would expect to get pretty close to a million of each number.

The uniform distribution is useful for some problems, such as shuffling a deck of cards, but it is not a good choice for many other scenarios that don’t involve a set of equally likely outcomes.

Normal (Gaussian) Distribution

The Normal Distribution (also known as the Gaussian Distribution) is the familiar bell curve. It is a good model for many real world phenomena. In a normal distribution, the average outcome is more likely than any other outcome. A slightly above or below average outcome is almost as likely, and extreme outcomes, while still possible, are very unlikely.

An example of this would be the distribution of IQ test scores. Most people would achieve somewhere close to an average score (maybe slightly above or below), but a few people would achieve very low scores and a similarly small number would achieve very high scores.

The nextGaussian() method of the java.util.Random class provides rudimentary support for obtaining normally-distributed values. Uncommons Maths’ GaussianGenerator class builds on this, making it easy to create distributions with different means and standard deviations. The standard deviation parameter controls how spread out the values are. A low standard deviation means most values will be very close to the mean (on either side). A high standard deviation increases the likelihood that a value will be a long way from the mean.

GaussianGenerator is a wrapper around a standard RNG (you can use any of the Uncommons Maths RNGs, or even one of the standard Java ones if you so choose). Once you have created a GaussianGenerator by specifying a mean, standard deviation and source RNG, you can call the nextValue() method ad infinitum:

Random rng = new MersenneTwisterRNG();

GaussianGenerator gen = new GaussianGenerator(100, 15, rng);

while (true)

{

System.out.println(gen.nextValue());

}

If we were to generate thousands of simulated IQ test scores with this code, we would see that the vast majority of scores would be close to the average (100). Around 68% of the values would be within one standard deviation (15) of the mean (i.e. in the range 85 - 115), and approximately 95% would be within two standard deviations (between 70 and 130). These percentages are a well-known property of normal distributions.

The demo shows how the distribution of generated values compares to a theoretical normal distribution (the more values you generate, the closer the fit will be).

-----------

here is a Short demo about the results:

https://uncommons-maths.dev.java.net/demo/demo.jnlp

Do you think it would be possible to try this out? Like taking the code stated in the article and implement it in a test version? We would do some additional playtests then and see if the complaints vanish and I can finally force everybody in my group to use your great tool

Thanks

and long live the Dragon