Okay, I’m at the roulette wheel, and I notice from the history list that a 30 hasn’t been hit at all. Ever. But instead of an actual wheel, it’s a virtual wheel, using a random number generator that works off a seed value. My understanding of these algorithms is that they will of a certainty generate a distribution over time, as opposed to true randomness where the distribution is a tendency rather than a certainty.
So, standing at this computerized wheel, is 30 actually becoming increasingly “due” as time passes — whereas it would not be “due” ever on a real wheel (given the elimination of patterning, which is achievable in various ways)? Should I start straight betting on 30?
I once programmed a version of Keno using plain DHTML webpages. In that version of the game, if you chose a specific group of numbers, you would make money as time went on. Other combinations, you would lose. But we wanted the users to win, so I left it that way.
In the case of casino gambling though, I’d warn against thinking that will work. There are ways to add true randomness to programs (for instance, adding in the time between pulls on the lever, pushing the buttons, etc.), and I would assume that anyone who actually stood to make or lose money and who had the budget for getting good machines would pick ones with such an ability.
If you computer program has a means to remember the numbers already selected, and then to balance the results, then yes, betting on an unselected number would make sense.
If however the program lacks an ability to remember past numbers and correct for past selections, then the numbers are closer to random and the Gambler’s Fallacy applies.
Let’s say it another way. If the program does not know what numbers were drawn in the past, how would it know what numbers were drawn in the past? If the program does not select underrepresented selections, then how would it selected underrepresented selections?
It doesn’t have to. The pattern of numbers selected is inherent in the algorithm (and in the seed value). Given an algorithm, a seed, and the current iteration number, you can just as easily go backwards as forwards in the sequence of numbers generated.
It’s true that they generate a certain distribution over time, but it isn’t guaranteed to be a uniform distribution. That is, no matter how many times you invoke the pseudorandom number generator (PRNG), some numbers may come up more often than others. Of course, you can use this fact to your advantage.
PRNGs have other flaws as well. Some of them, for example, are very non-random in their low bits, sometimes to the point where the lowest bit always alternates between 0 and 1. Therefore if you knew for certain that such a PRNG was used on a roulette wheel, and the game allows you to bet that the number will be odd or even, then you could always win by alternating your bets between odd and even.
Another flaw is that the difference (or some other characteristic) between successive PRNs may be somewhat predictable. Therefore you might be able to win in the long term at roulette by observing a large number of successive spins and noting if, for example, successive numbers almost always differ by at least 5. Then when you see the ball land on 15, you know next time to bet on numbers less than 11 or greater than 19.
Finally, all PRNGs eventually repeat their sequence (unless reseeded), so if you wait a really, really long time to observe all possible spins, you can make a note of when the pattern starts repeating, and then correctly predict every single spin from then on.
Be advised that none of these tricks are guaranteed to work for real casinos (real or virtual), since I would expect most of them use sophisticated PRNGs which don’t suffer from the above flaws (except for periodicity, though it’s rarely practical to break a PRNG by that method), or else true RNGs which use random data from the environment.
Without gaming the formula, there would be no way to use past numbers to predict future numbers. In a true random series, there would be no way at all to predict a future number from a past number.
If a pseudo-random number generator has seldom or never given the number 30, doesn’t that mean it probably won’t in the future? Unless the program includes balancing out underused numbers like Paul in Saudi suggested, I would think you’d want to avoid 30.
If your number generator is accurate it will return every number equally over the long term. The question then becomes: what is the long term?
In real life, you might need to stand at a roulette wheel for hundreds or thousands of spins before 30 came up. This would bankrupt anybody who tried playing 30.
A number generator could spit out billions of results in an instant. If 30 did not show up the odds of it happening are real but so low that you would be better advised to look at the algorithm and see if there is a flaw.
But in the case of a pseudo-random number generator, it uses the present seed to generate the next “random” number in the sequence, and then uses that one to generate the next one, and so on.
With a truly random number generator, knowing which numbers have already come up gives you absolutely no information about what is likely to come up in the future. With a pseudo-random number generator, that’s not necessarily true. In fact, I think it’s safe to say that with a bad (overly simplistic, poorly designed) PRNG, it’s not true. The OP’s question, if I understand it, is whether there are PRNGs that are good enough so that it is true (for all practical purposes).
It is. A cryptographically secure pseudorandom number generator can be cracked, but it requires you to watch its output for a really long time. There’s more to it than having a long period; the Mersenne Twister is the PRNG of choice these days, as it has can generate 2[sup]19937[/sup] - 1 values before repeating itself and has a few other nice properties, but it’s not considered cryptographically secure (see the same article).
What about slot machines? I understand that the spins are not really random, they are programmed. They are made to pay out a percentage, eg they may be set to pay out 97% of money put in. The machines are all linked together, money put in one affects the payout of another.
So, does a payout become more likely after a long run of no wins? Does a set of machines say to itself, aha no payouts for a while, we must give someone a prize to keep up the 97% payout? Or not?
But wouldn’t there be other players online? You may know that the random number alternates between odd and even, but you don’t know how many numbers have been generated in between your own spins.
Sort of. Inside the machine, coins are stacked in payout tubes and these tubes have a sensor in them to detect whether they’re full or empty - a machine that has just paid out a big jackpot and has empty tubes will not pay out again until they fill up - in the case of a machine with full tubes, that restriction doesn’t occur. The machine does manage its own payouts so as to keep them near an average preset win level.
Sometimes you can hear the coin you inserted overflowing the tube and splashing down into the big coin box in the bottom - this doesn’t mean a big win is guaranteed, but it probably does mean it’s less unlikely.
Just because a §RNG is made to favour certain results doesn’t mean it’s not random. It just means that it doesn’t produce a uniform distribution. Usually this is by design, though as I mentioned earlier it can be an unintended flaw.
Well, to simplify things I was assuming a single roulette wheel with a single player and a single PRNG. Once you start complicating things the system gets harder to crack.
I don’t know if it was true at one time. But when I was in Vegas about 6 weeks ago the slot machines no longer use coins. They just take bills and payout in machine readable tickets. That you can cash in at other machines for real money or put into the bill slot on other slot machines. So I would not start thinking about cleaver ways to weigh slot machines.
Well, it’s certainly true that a machine with depleted coin tubes cannot pay out a large jackpot - physically, if there are no coins in there to be paid out - and there are sensors to detect this condition, and this condition occurs when the machine is first used after completely emptying the cash.
The rest is based on information I was told when I worked on job experience as a slot machine installer for a couple of weeks back in the late 80s - certainly the machines weren’t anything like simply random, or simply pseudo-random - they actively managed their own payouts so as to remain near to an average percentage payout. Not all of this management went into the way the reels fell on each turn - some of it was imposed on the results of those ‘double or quits’ flashing things that have people trying to hit the button when it flashes on ‘double’ (when in fact the outcome of the trial is decided before the button is even pressed.
Employees were forbidden to play any of the machines installed by the company, even in their own time, because of the potential for winning through insider knowledge - but of course exactly the same machines were installed by other companies in other premises, so the guys would play those instead. One guy I worked with and knew outside of work would make a point of sitting at a table near the machines and would watch to see if he could play after anyone who had played and lost a serious amount, because the machines would be ripe for a big payout, and he was quite often right about it (more than I think can be attributed to chance anyway).
Remember, I’m not talking about someone beating the odds consistently in a fair game, I’m talking about someone exploiting the behaviour of a system that contains random elements, but is constrained to try to pay out a fixed percentage.
Casinos here in Vegas advertise pay percentages on their machines. Like 99% payout, meaning that the machine will pay back 99% of what’s played. So, if you can observe a single machine for its lifetime, and see that it has only paid 96% of what has been played, I think you can assume that the machine will pay more than another unobserved machine.