
The Pseudorandom Concept - pronounced "sue-doe-ran-dum" - is a concept that deals with the use of pseudorandom numbers. It is commonly used in computer programming, video games, and just about anything that is based on chance.
The pseudorandom concept is very hard to understand at first. Simply said, it's basically just a process that generates numbers that appear to be random, but aren't.
From my understanding, most pseudorandom processes work the same way. A long list of numbers is generated and when a number is requested it is given. The problem is that this list of numbers is set and does not change. This means that if you run a program that will display a few random numbers, quit, and then run it again, it will produce the exact same results.
It might look something like this:
*Program Begins*
*Here is a random number: 12*
*Here is a random number: 4*
*Here is a random number: 3*
*Here is a random number: 85*
*Quit Program*
*Program Begins*
*Here is a random number: 12*
*Here is a random number: 4*
*Here is a random number: 3*
*Here is a random number: 85*
*Quit Program*
As you can see, the numbers are indeed random, but they are the same for each individual run of the program. This occurs because when the program is run the random numbers are taken from a list. The numbers are taken, one by one, from that list starting at the beginning. So, each time the program is run, the numbers start from the beginning of the list each time.
So who cares? Why does it matter?
Think about it like this: if you know what "random" numbers are going to be used in a program, you can act accordingly. Example: video poker machines. Oh shit, you're interested now, aren't you?
But who am I kidding, there's no way I could figure out a way to use this idea to cheat at a gambling machine in Vegas, right? Wrong. In fact, it's been done before, but that's not what I want to talk about.
Here's how it works: A long list of numbers is produced by the computer. As I mentioned earlier, the numbers are picked off from the beginning, one by one, when requested. But, there is a much more efficient way that we can use this process. It's known as "seeding" the pseudorandom number generator. Basically, this just means that, instead of beginning at the start of the list, we will start at a different location and use numbers from there on. The "seed" is normally determined by the time at which you call the pseudorandom number generator. This way is fairly effective at producing random numbers as they will be different every time.
It will look like this:
*Program Begins*
*Here is a random number: 8*
*Here is a random number: 3*
*Here is a random number: 7*
*Here is a random number: 23*
*Quit Program*
*Program Begins*
*Here is a random number: 4*
*Here is a random number: 46*
*Here is a random number: 5*
*Here is a random number: 11*
*Quit Program*
The only problem is that the list of numbers we use is the same, we just start in a different place. But this seeding process tends to produce numbers that are "random enough" for almost any application and for that reason this process is very commonly used in many areas of computer programming and technology.
For example, let us consider Pokemon games*. Pokemon games are very unique in that although they appear to be childish games, the intricate programming that is used to determine aspects of the game, such as IV's, shiny Pokemon, what wild Pokemon you will encounter, catching Pokemon, etc. are all determined by this process. For this reason I tend to use Pokemon games as a resource for testing my computer programs.
You see, when you catch a Pokemon, even if it is the same as one you already have AND it has the same level, it may have better/worse stats. This is due to the fact that different Pokemon have different IV's and these IV's are determined by the pseudorandom number generator used by the game. So if you catch a Pokemon and analyze the IV's (as well as knowing the current time), you can determine where the pseudorandom number generator was seeded. This allows us to predict which numbers will come next. Therefore, we can analyze the list of future random numbers and determine which will produce a Pokemon that is, for example, very strong.
This whole process (for the Pokemon games*) has been recreated in a program that you can download on the internet. It allows you to determine when a shiny (or rare/strong) Pokemon will appear, and how to advance the number generator to that point in order to access the random numbers that will produce the desired result. I tested the process last night and I hatched a shiny Pokemon (only took about 20 minutes to do the whole thing). It worked perfectly.
Example: Regular Charizard (top), Shiny Charizard (bottom).


But this isn't just used in Pokemon games. As I mentioned earlier, you could enter the cards shown on a video poker machine and then determine what random numbers produced that exact combination of cards. With that known, you could then determine where the generator was seeded in order to known which cards would show up next. You could then wait until a good hand would show up and play the game, ultimately winning a lot of money.
It's such a simple loophole but it's always correct. There are some more advanced pseudorandom processes that are much more complex and hard to counter, although no pseudorandom generator is impossible to beat. Only a truly random process is impossible to counter.
Some people joke that if they could "see the future" they would play the lottery. But in reality this is pretty much the same thing, only you really can see the future. Seriously, you could become rich off of this technique. Or, you could become a bus driver. It doesn't matter to me, it's your choice.
*I am referring to Gen 3+ games.
0 comments:
Post a Comment