Has the Random Numbe Generator been tested?

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Message
Author
Omega Blue
Thalore
Posts: 190
Joined: Sun Oct 31, 2010 2:50 pm

Re: Has the Random Numbe Generator been tested?

#16 Post by Omega Blue »

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.

Omega Blue
Thalore
Posts: 190
Joined: Sun Oct 31, 2010 2:50 pm

Re: Has the Random Numbe Generator been tested?

#17 Post by Omega Blue »

The easiest test I can think of is to generate a normal distribution and see if it is skewed.

XLambda
Wyrmic
Posts: 237
Joined: Wed Jan 25, 2012 5:39 pm

Re: Has the Random Numbe Generator been tested?

#18 Post by XLambda »

The most elegant test would be a formal proof. :lol:

Camcolit
Cornac
Posts: 39
Joined: Fri Apr 19, 2013 6:38 pm

Re: Has the Random Numbe Generator been tested?

#19 Post by Camcolit »

Grey wrote:Also note that humans are very good at spotting patterns in random noise.
Yeah, maybe she doesn't like me after all :(

Mewtarthio
Uruivellas
Posts: 717
Joined: Mon Jul 16, 2012 6:03 pm

Re: Has the Random Numbe Generator been tested?

#20 Post by Mewtarthio »

Camcolit wrote:
Grey wrote:Also note that humans are very good at spotting patterns in random noise.
Yeah, maybe she doesn't like me after all :(
If your girlfriend is emitting random noise, you may have more pressing concerns to deal with.

supermini
Uruivellas
Posts: 800
Joined: Tue May 15, 2012 11:44 pm

Re: Has the Random Numbe Generator been tested?

#21 Post by supermini »

Mewtarthio wrote:
Camcolit wrote:
Grey wrote:Also note that humans are very good at spotting patterns in random noise.
Yeah, maybe she doesn't like me after all :(
If your girlfriend is emitting random noise, you may have more pressing concerns to deal with.
She might be deflating?
<darkgod> all this fine balancing talk is boring
<darkgod> brb buffing boulder throwers

Suslik
Spiderkin
Posts: 481
Joined: Wed Aug 22, 2012 4:41 pm

Re: Has the Random Numbe Generator been tested?

#22 Post by Suslik »

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.

Stormwolf
Posts: 3
Joined: Wed Jun 12, 2013 3:14 pm

Re: Has the Random Numbe Generator been tested?

#23 Post by Stormwolf »

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.

ajfluffy
Thalore
Posts: 190
Joined: Thu Jan 17, 2013 2:49 pm

Re: Has the Random Numbe Generator been tested?

#24 Post by ajfluffy »

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.

Strongpoint
Wyrmic
Posts: 212
Joined: Tue Apr 10, 2012 5:33 pm

Re: Has the Random Numbe Generator been tested?

#25 Post by Strongpoint »

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.

ajfluffy
Thalore
Posts: 190
Joined: Thu Jan 17, 2013 2:49 pm

Re: Has the Random Numbe Generator been tested?

#26 Post by ajfluffy »

Yes that's difference between combinations and permutations. That should be independent of what algorithm was used.

ibanix
Wyrmic
Posts: 244
Joined: Thu May 23, 2013 12:25 am

Re: Has the Random Numbe Generator been tested?

#27 Post by ibanix »

This is all I have to say about random number generation:

http://search.dilbert.com/comic/Random% ... 0Generator
Please help with the ToME wiki!

ohioastro
Wyrmic
Posts: 202
Joined: Thu Jan 20, 2011 4:32 am

Re: Has the Random Numbe Generator been tested?

#28 Post by ohioastro »

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.

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Has the Random Numbe Generator been tested?

#29 Post by jenx »

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.
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.

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

Suslik
Spiderkin
Posts: 481
Joined: Wed Aug 22, 2012 4:41 pm

Re: Has the Random Numbe Generator been tested?

#30 Post by Suslik »

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?

Post Reply