Post Details Page

How Genshin Impact gacha works, and why these gacha "rituals" do not work

I am kind of making a different kind post right now (the more educational type). I already explained 2fA in a different post, but here I am going to explain something extremely important for Genshin Impact gacha: random-number generation.


Firstly, you need to understand that with very few exceptions, all numbers that computers generate are done in a same predictable way.

How does Genshin Impact gacha work?

Pseudo-random numbers. Pseudo-, because they are not truly random.


When you register your account, Genshin's servers generate a seed. These seeds are far more random and can be measured down to the millionths place (or even more precise) based on anything from the current time to the voltage of the power supply to the ambient temperature inside of the server room, etc. But the thing about a seed is that even if it is not truly random, the sequence used by the pseudo-random number generation will be completely different if the measurement changes even a tiny fraction. Think chaotic double pendulum: starting the pendulum in a slightly different position can drastically change the way it behaves.


When you make your first gacha pull on a given banner (I am assuming that character, weapon, and permanent banners all use their own seeds), the seed goes through a mathematical operation known as a one-way function, then comes out as a pseudo-random number.


Now here is where the magic happens: if you want to generate more pseudo-random numbers, you take both the seed and/or previously generated numbers, put them back into your mathematical operation, then you get another pseudo-random number. And since the only way for you (the player) to predict the sequence is to know the seed and/or the random numbers, you will not be able to predict exactly when you will pull a 4*/5* item.


Earlier, 20th-century means of pseudo-random number generation include the "middle squares" method, which involved taking a truly random number, squaring it, then removing everything other than the middle digits. We have moved past that and towards better sequences that have a long period.


Pseudo-random numbers have one weakness; at some point, the sequence is going to repeat. This means that you want an algorithm that can generate sequences that take a long time to repeat. The middle squares method is not the best means of doing so since for some numbers, the sequence repeats much quicker than other numbers. Wikipedia has a list of pseudo-random number generators, and if you scroll down to the bottom, you see the newer ones that may be in use across the web today.


It would not be super imaginative to think about how miHoYo could change a few lines of code to allow for pity to work, but even with this in place, at the core, it is just pseudo-random numbers that are being used to determine the item you won.

Why do these gacha "rituals" not work?

Simply put, it is the means by which pseudo-random number generation works. Going on top of the Mondstadt church statue or to the summit of Qingyun Peak will not affect the pseudo-random number generation. Without knowledge of the seed used to generate the random number, you will be unable to predict exactly when you will obtain a specific item. This is why it is a one-way function; given a seed, you can easily get random numbers, but given any or all of these random numbers, you will not be able to predict the seed. Cracking the original seed may take hundreds, maybe even thousands of years if implemented correctly.


(edit/addendum):

Why can't the seed just be used as the random number?

Because even the seed is not truly random. But with any measurement there will always be noise, which is why when measuring something like temperature, the instrument only shows the significant digits and omits the rest. It is these meaningless digits that play a key role with random number generation.


For example, a thermometer may only be able to measure one meaningful digit past the decimal point. If you (or a computer) measure the temperature of the room, you may get 30.7℃. The thermometer may actually be measuring 30.763167531℃ one second and 30.725659268℃ the next. But since well-designed pseudo-RNGs work like the chaotic pendulum, this minuscule change will have a huge impact on the random numbers generated.

Genshin Impact • Discussions & Sharing
General Discussion
45
43
11
45
0
All comments 43

Loading...

All Tools

Recommended Users