# There is no such thing as a Random Number Generator (RNG) for a computer

While there is certainly something people call a random number generator (RNG here), it does not actually generate random numbers. Computers are not capable of this.

Before you read on, note: this is nerdy information (which seems welcome here), it will not in any way affect your gameplay, and there is no realistic way to use this information to cheat the odds.

People are capable of thinking of a random number from x to y, but computers have no capability to generate something from nothing. There always needs to be input of some kind. Programmers can effectively simulate the picking of a random number, but it always needs input, which then bases the number on something, making it not really totally random.

The most used method for programmers is to use the system time clock, and specifically the milliseconds. If a number from 1 to 25 is needed, the programmer will take the total milliseconds on the clock, divide it by 25, then take the remainder as the generated number. You can see how this would be a problem if they used something large like full seconds, but milliseconds and smaller units go by so fast that they are effectively random if you stop them at any given point. To randomize it even more, a seed number is often used (added to or multiplied by the clock number). When programming command line mainframe stuff, the seed can be input by the user. With a program such as Empires, it could be any unpredictable thing (like the 4th letter of your username multiplied by the last number of your account). The stranger the seed, the more closely approaching random the resulting number is.

In the end, these numbers are effectively random, but not actually random since they are based on something with a repeating pattern (the clock). It would take a similarly powered computer to āhack the systemā so to speak, which isnāt realistic, so no one really worries about that.

Anywayā¦this isnāt actually useful information, just interesting to computer and math nerds. Also, Iām bored at work and my boss can see when Iām playing on my phone, so here we are.

4 Likes

I always equate RNG with āluckā, which doesnāt exist either.

1 Like

Hmmm speaking of RNGā¦

Iāll leave you with them mathematics. Busy lvling this bad boy.

2 Likes

This is something that even i (that i have serious problem even changing the desktop) knows.

You basically say that computers donāt think.
Okā¦ ehmā¦ thanks?

I would assume itās taken probably off /dev/urandom on the server side.

Not perfect, but not that easy to manipulate either.

This is true. My first computer was a Radio Shack CoCo. It would always give the same RND #, You had to add an extra line in code to make it true RND. In the interview with the developers, SG consulted a math expert for some of the randomness (or so I read). So yea thanks for letting me remember my youth.

While the OP is fundamentally correct, Iād argue that the point that āpeople can make random numbersā is probably not entirely true.
People also utilise a form of (logic-based) seed when creating random numbersā¦ especially if theyād need to make a long list of them. They canāt help but think about whether the number they are coming up with is really ārandom enoughā.
Theyād have thoughts like ācan I just repeat the same number over again?ā or āthe last 3 numbers Iāve given have been in ascending order. Time for a lower one nowā.

Iād argue youād get a more true and pure ārandom sequenceā out of a computerās pseudo-random generator than you would out of any human.

I guess we arenāt too far off starting to leverage the quantum uncertainty principle to help generate our next number, but then consider: Will the act of reading the number then change it? (Tongue in cheek of courseā¦ donāt want this to boil down to an argument about quantum mechanicsā¦ )

1 Like

Completely true from Little_Infinity. People will always have a bias, even if they are not consciously aware of it. The only true way is probably a dice roll or card draw or something else mechanical.

2 Likes

This āRandomā is a jokeā¦
Me and my girlfriend started this game 6months ago, we have the same lvl buildings and etc.
We have not spent any money on the crystals, however now:
my team: three 4 star titans and three 4 star troops;
my girlfriend team: FOURTEEN 4 start titans and FIVE 4 start troops.

14 vs 3 - Ridiculous!