Get up to $4,000 in bonus cash - a 400% match at Lucky Red Casino. Click here to download and play!
Random Number Generators
A random number generator (or RNG) is a machine or method that produces a number or a series of numbers (or other symbols) with no pattern or underlying logic. This is a bigger computational challenge than at first might appear. Computer programs are comprised of logic, so it is tricky to have a computational result that is clear from any underlying algorithm, formula or logic. Recall from school (or our discussion of the math associated with gaming) that is is impossible to look at a number or a set of numbers and by examination conclude that they were randomly generated. Randomness is defined through the process whereby they are created, not the result. Before computers, a commonly-used RNG was a "hat" into which slips of paper were put and then mixed up. A disinterested person would blindly pull one of the slips out of the hat, and that was taken as a random result. The spinning cage full of bingo numbers was another kind, as also the television
device of blowing ping pong balls in a chamber to come up with the winning lottery numbers. In the "old days" mathematicians would use tables of random numbers, which were available before computers were around.
Why is randomness important?
Random is associated loosely with "fair." Recall that all probability distributions have an "expected value" (also thought of as an average or mean), which is usually in the center of the distribution, and then a random variation from that mean (usually on both sides), which declines in the format of a "bell curve" (or one of its relatives) towards nothing, the farther away from the mean it goes.
In the physical world, like that of the brick-and-mortar casino, random variation is handled by the devices employed - that is, the dice or the roulette wheel or the frequent shuffling of a fair deck. The coin toss example, so often used in discussions of chance, usually specifies a "fair coin." This means that the probability of a specific outcome in the physical world (like heads in a coin flip) is the same as the mathematical expection, assuming random variation. If, after 1,000 coin flips, heads were to prevail over tails by some significant amount, say, 600 to 400, one could conclude that the coin was not "fair." In the same vein, if the dice are not loaded or the roulette wheel is free of interference as it spins, then people say that the process is "fair" and (absent the influence of Lady Luck) each physical outcome (like a roll of dice or a spin of roulette) has physical outcomes consistent with what the math says would be random variation.
The opposite of random is "determined" or "deterministic." If a dishonest roulette wheel has a magnet under the table, which tends to make the wheel stop on a certain slot or pocket, then the process is not random, but rather deterministic. By examining a large number of outcomes of the wheel's spins, it would be possible to draw a conclusion about whether it was "random" or "fair," or whether it was a cheater.
How RNG's Work
There are "true" RNG's and "pseudo" RNG's. True RNG's generate random data by digitizing the random events of nature. Scientific companies can use, for example, atmospheric noise, radio noise, nuclear decay, cloud patterns or even lava lamps to provide "analog randomness." Mathematicians have also been able to come close to true, theoretical randomness, using so-called "pen-and-paper" methods and pure math theory. Where absolute unpredictability is required, recourse must be taken to a "true" RNG, which generates digits based on the random analog events of nature. Unfortunately, neither the "trueª RNG approach nor the "pen-and-paper" RNG approach is practical for most software applications.
Early in the computer era, algorithms were invented to generate random numbers, but, since they use a deterministic method of producing the result (i.e., the algorithm itself), such RNG's are called "Pseudo-Random Number Generators" (or PRNG's). They can generate strings of up to a million randomly-ordered digits, but eventually the sequence begins to repeat. Pseudo RNG's are considered good enough for most purposes, including online gaming. PRNG's can be patented if they are sufficiently innovative.
Almost every computer programming language has of a "random number" function, usually designed to generate a mantissa (the fractional part of a floating point number) of a user-specified number of digits, taken from a set of such numbers uniformly distributed between zero and one. Often these functions are "seeded" using the computer's real-time clock. They tend to repeat patterns after only a few trials (less than 100,000), but are fine for many applications, like simulations and video games, but not for cryptography or most online gaming. Higher quality randomness can be achieved through modern computer operating systems like Linux, Microsoft Window and Mac OS.
The RNG chip inside a physical slot machine functions by generating random numbers constantly, several thousand times per second. When the moment comes to determine the result of a specific "spin" or "pull" of a handle, the RNG delivers, in that precise instant, the numbers to display as symbols or other graphic outcomes. A millisecond earlier or later, and the result would be a different random number. (It is for this reason that it is nonsense to believe that a given slot machine is "due" for a payoff or "about to" hit a jackpot. Each fraction of a millisecond is its own, independent and individual trial.)
Randomness Applied to Online Gambling
In the virtual world, of course, there are no real, physical dice or roulette wheels or decks of cards. They are all simulated by computer programs. The program's graphics gives the player a real sense that the cards (or the dice or the roulette wheel) are, in some sense, "real." The program's RNG is what generates the outcomes, and gives the player the real sense that the "physical" result is the product of a random process rather than a determined one. This makes the process "fair" in the same sense as the cards, dice and wheels in an honest brick-and-mortar casino. A couple of PRNG's have gained acceptance in the gaming software industry, as they were developed specifically for these applications, overcoming possible drawbacks of earlier versions. One example is the "Mersenne Twister" PRNG, invented in 1997.
What if the RNG Is Not Truly Random?
This is the point at which careful online players will pay attention to the web site's information about its software, its RNG (if detailed disclosures are made) and about the audits and supervision of the site. Some testing companies carefully study how the software behaves and then come to a conclusion about the fairness (i.e., true randomness) of the RNG being employed. If the software methodically skews results towards an expected value different from the one that theory would predict, one of two bad situations result: If the "real" performance is more favorable to the house than the theoretically random performance would indicate, the house has a greater edge than the players are led to believe. People who place bets based on the theoretical edge are being cheated. The other possible bad outcome, and one more often seen in the real world, is that the RNG does not necessarily favor anyone systematically, it just generates outcomes that are not truly random. Thus, when people play, presuming true randomness from the software, in truth the variation makes everything less predictable. It is like sailing with an inaccurate compass that is inaccurate in unforeseeable ways.
Can You Win at a Casino that uses an RNG?
One blogger complained some time ago that "it is impossible to beat RNG casinos." He was evidently confusing the randomizing mechanism with the house edge. Remember, even if a game is "fair," it may not be "even" in the sense that the payouts for winning reflect the true probabilities of success. To illustrate, assume that the game is American roulette, created online by software that simulates spins of a roulette wheel, using a random number generator. In all casinos - online or brick-and-mortar -- the house edge is 5.26% (with the exception of one roulette bet, where the house edge is higher). Over a large number of betting incidents (called "trials" in statistics), the "fair" RNG should cause every one of the player's dollars to turn into a value approaching $0.9474 cents. Just as in the brick-and-mortar casinos, it is possible for a player to have better outcomes in the short run, and also worse ones. Is it possible to win in the long run when the edge is against the player? No. The RNG has nothing to do with that. If it turns out that the RNG tends to produce outcomes with an expected value other than the house edge, then there may indeed be a problem with the software (or the operators!).
What is RNG Certification?
The expansion of online gaming has brought with it a rapid growth in the number of companies that provide services to online gaming establishments. Prominent examples are auditors and testing companies. The testing companies will analyze the software of client online gaming establishments and then certify them as "fair." For example, a company called Gaming Associates certified Bodog's RNG and casino software as "fair" in August of 2007. Naturally, such an event is an opportunity for marketing to the gaming public, and in this example, Bodog did not miss a beat. Virtually every respectable online gaming site is able to state that its RNG and gaming software has been independently certified as fair. The more the gaming sites can reassure the using public of the integrity of the software, the easier it is to acquire and retain customers.
Gaming software manufacturers also seek independent verification of the accuracy and integrity of the RNG engine in their respective gaming systems. For example, Playtech, a prominent purveyor of online gaming software, subjected its programs to scrutiny by Technical Systems Testing (TST), an accredited testing facility with experience in games of chance. This company's credibility comes, in part, from its role as certifier of procedures in several state and provincial lotteries in North America. According to Playtech's press release, the tests were "impartial, independent and undertaken in the strictest confidence." Other examples abound. Certification by an independent testing agency also involves periodic follow-up monitoring if the company wants to keep displaying the testing company's logo on the web site.
Cynics may ask questions about the whole certification trend. Could it be similar to phenomena that took place years ago in heavy manufacturing, where standard-setting institutions, testing facilities and award-conferring organizations would often have close relationships with the companies and products they certified to the public? In the online gaming industry, the auditors and testers work hard to demonstrate their independence from their clientele, and they actively defend the neutrality of their work. Of course, it is up to the individual customer to look at these certifications and decide for himself (or herself) whether the certification is truly independent, or whether it is a cooked-up or choreographed endorsement from some unrecognized appraiser, thrown together for purposes of marketing hype. Both scenarios are possible, though the latter is increasingly rare as the industry matures.
How does RNG Certification Differ from Audits?
The appraisal of the RNG is restricted to determining whether the variation in outcomes created by the software is random. While the outcomes should have an expected value (equal to the various theoretical probabilities), the variation from that expected value should be unpredictable. This question, that of the "true probability" or "physical expectation," is one of three elements found in every
bet. The audit addresses the other two elements: The cost to play and the payoff if you win. When a casino reports its payout percentages on certain games, it is commiting to the playing public that it is in fact not reaping higher rewards with higher edges. The auditor can determine whether this is true. For example, if the "payout percentage" for blackjack is reported as 98.5%, the auditor will
determine whether that is in fact the case. Of course, if the payout percentage turns out to be much lower than it should be, this may mean that there is something wrong with the RNG as well.
Please use this comment form to leave a brief comment, review, correction, etc. about the topic: "Random Number Generators - Online Gambling Guide"
If you want to start a discussion, there's no better place for that than our new Vegas forum.
Vegas 365 will award a cash prize each month starting in January, 2011 for the "Top Contributor" in the forum. Click here to get started!


Comments
Post new comment