Has the Random Numbe Generator been tested?
Moderator: Moderator
-
- Thalore
- Posts: 190
- Joined: Sun Oct 31, 2010 2:50 pm
Re: Has the Random Numbe Generator been tested?
Randomness doesn't mean you don't get runs. You can test this by tossing a coin. Often you get several occurrences of the same side.
-
- Thalore
- Posts: 190
- Joined: Sun Oct 31, 2010 2:50 pm
Re: Has the Random Numbe Generator been tested?
The easiest test I can think of is to generate a normal distribution and see if it is skewed.
Re: Has the Random Numbe Generator been tested?
The most elegant test would be a formal proof. 

Re: Has the Random Numbe Generator been tested?
Yeah, maybe she doesn't like me after allGrey wrote:Also note that humans are very good at spotting patterns in random noise.

-
- Uruivellas
- Posts: 717
- Joined: Mon Jul 16, 2012 6:03 pm
Re: Has the Random Numbe Generator been tested?
If your girlfriend is emitting random noise, you may have more pressing concerns to deal with.Camcolit wrote:Yeah, maybe she doesn't like me after allGrey wrote:Also note that humans are very good at spotting patterns in random noise.
Re: Has the Random Numbe Generator been tested?
She might be deflating?Mewtarthio wrote:If your girlfriend is emitting random noise, you may have more pressing concerns to deal with.Camcolit wrote:Yeah, maybe she doesn't like me after allGrey wrote:Also note that humans are very good at spotting patterns in random noise.
<darkgod> all this fine balancing talk is boring
<darkgod> brb buffing boulder throwers
<darkgod> brb buffing boulder throwers
Re: Has the Random Numbe Generator been tested?
I wager the behind reason vendors selling a lot of similar items is that instead of generating 12 random items, it first generates ~3 random types of items and then ~4 items of each type. So there are usually ~4 regen infusion, ~4 movement infusions and ~4 phase door infusions instead of 12 random ones.
Re: Has the Random Numbe Generator been tested?
As a developer on another game, my favorite answer is:
God hates you. Luck has abandoned you. I, as the almighty developer, have put in an IF statement to screw you over. Deal.
God hates you. Luck has abandoned you. I, as the almighty developer, have put in an IF statement to screw you over. Deal.
Re: Has the Random Numbe Generator been tested?
It should be easy enough to test it, but my experience with random type functions is that there effectiveness can vary slightly depending on the range requested. If I have time this week, ill generate a few million random numbers within a couple ranges and verify it doesn't have issues.
If anyone knows the most common ranges used, that would be very useful.
If anyone knows the most common ranges used, that would be very useful.
-
- Wyrmic
- Posts: 212
- Joined: Tue Apr 10, 2012 5:33 pm
Re: Has the Random Numbe Generator been tested?
Love that RNG threads
Grouping is to be expected from the laws of probability:
Example:
We have 8 escorts per game and 8 escort types assuming that all escort types are equally likely (is that true?.)
Specific escort type chances to appear:
0 times: 0.343
1 time: 0.393
2 times 0.196
3 times 0.056 , 3+ time 0.067
4+times 0.011
5+times
If escort types appearances was independent from each other (It's not, if some escort doesn't appear 3+ times than it's more likely that another will appear 3+ times ) then chance to have 3 or more escorts of same type in one game = 42% . Every second game should have 3 escorts of the same type
For 4+ that's 8.5% probability, every 12th game should have that (in fact more, because as I said I ignored the fact that those aren't independent)
Edit: damn it's nine... Should recalculate
Edit2: fixed math below:
For specific type:
0 times: 0.301
1 time: 0.387
2 times: 0.221
3 times: 0.073, 3 times+ 0.091
4 times+ 0.018
5 times+ 0.0025
3 times+ for one of escort types per game: at least 0.576. Yes, more than half of games should have 3 escorts of the same type. If that wasn't true than we could say that RNG doesn't work
4 times+ for one of escort typer per game: at least 0.135.
Grouping is to be expected from the laws of probability:
Example:
We have 8 escorts per game and 8 escort types assuming that all escort types are equally likely (is that true?.)
Specific escort type chances to appear:
0 times: 0.343
1 time: 0.393
2 times 0.196
3 times 0.056 , 3+ time 0.067
4+times 0.011
5+times
If escort types appearances was independent from each other (It's not, if some escort doesn't appear 3+ times than it's more likely that another will appear 3+ times ) then chance to have 3 or more escorts of same type in one game = 42% . Every second game should have 3 escorts of the same type
For 4+ that's 8.5% probability, every 12th game should have that (in fact more, because as I said I ignored the fact that those aren't independent)
Edit: damn it's nine... Should recalculate
Edit2: fixed math below:
For specific type:
0 times: 0.301
1 time: 0.387
2 times: 0.221
3 times: 0.073, 3 times+ 0.091
4 times+ 0.018
5 times+ 0.0025
3 times+ for one of escort types per game: at least 0.576. Yes, more than half of games should have 3 escorts of the same type. If that wasn't true than we could say that RNG doesn't work
4 times+ for one of escort typer per game: at least 0.135.
Re: Has the Random Numbe Generator been tested?
Yes that's difference between combinations and permutations. That should be independent of what algorithm was used.
Re: Has the Random Numbe Generator been tested?
This is all I have to say about random number generation:
http://search.dilbert.com/comic/Random% ... 0Generator
http://search.dilbert.com/comic/Random% ... 0Generator
Please help with the ToME wiki!
Re: Has the Random Numbe Generator been tested?
I just had an adventurer party that had three identical party members with virtually identical gear - same items, same bonuses, the works. I couldn't capture a screen image of the inventory but I did save the charball. I know how random numbers work (do a lot of simulations professionally) and I really think that there is something, at least in the item generation seed, that is distinctly not-random. You just get too many items of the same type and the same bonuses given the sheer variety of potential items and types that the game could have.
Re: Has the Random Numbe Generator been tested?
Is the rarity, and less-so zone-dependence, of an item a factor in all this? AFAIU, some tiems are more likely to appear, as they have lower rarity. For example, I have been through the prides dozens of times, and thought I had seen everything, but a few days ago got quite a surprise to pick up Tome of Uttercold. Code-diving reveals that it only appears in Vor Pride, and has rarity of 200.ohioastro wrote:I just had an adventurer party that had three identical party members with virtually identical gear - same items, same bonuses, the works. I couldn't capture a screen image of the inventory but I did save the charball. I know how random numbers work (do a lot of simulations professionally) and I really think that there is something, at least in the item generation seed, that is distinctly not-random. You just get too many items of the same type and the same bonuses given the sheer variety of potential items and types that the game could have.
I've never seen anyone refer to it before in chat or noticed it on char sheets before (if it appears there?).
Just wondering...
MADNESS rocks
Re: Has the Random Numbe Generator been tested?
Today I have found a magic rune vendor with ~10 phase door runes and 1 manasurge. Of course I needed a shield. Let us consider there are only 3 runes: phase door, manasurge and shielding. The probability for 10 runes in a row to be one and the same type, assuming uniform distribution is 3 * 1/3 ^ 10 ~ 5e-5. Apparently that's very unlikely. And actual chance is far lower, because there are more than 3 types of runes.
Can someone clarify how that is possible? Why do vendor items often lack variety and a lot of same type items are generated instead?
Can someone clarify how that is possible? Why do vendor items often lack variety and a lot of same type items are generated instead?