CasinoCityTimes.com

Gurus
News
Newsletter
Author Home Author Archives Author Books Send to a Friend Search Articles Subscribe
Stay informed with the
NEW Casino City Times newsletter!
Newsletter Signup
Stay informed with the
NEW Casino City Times newsletter!
Recent Articles
Best of John Robison

Gaming Guru

author's picture
 

Ask the Slot Expert: How do video poker machines deal cards?

2 August 2017

Question: Two questions:

  1. Have you ever had your bet refunded by a slot machine? If not, what would make it do this?
  2. There was a scratch ticket in Texas that guaranteed a winning ticket. You paid $20 and you were guaranteed to win at least $5. Is there a slot machine like this?

Answer: First question: No, I have never had a slot machine refund a bet and I don't think it's possible. I'm trying to remember how machines worked back in the coin days. When you dropped a coin in the coin head, the comparitor either accepted the coin and added one to the amount bet and sent the coin on its way to either the hopper or the overflow bucket, or it rejected the coin and sent it to the coin tray. The machines weren't like vending machines that had a coin return button. If you decided you didn't want to play after dropping in a coin, you were out of luck.

On ticket machines, anything put in the bill acceptor goes straight to the credit meter. They don't have the ability to put in money and have it go to the amount bet meter.

I think what you're really wondering about is having a machine refund your bet after you pressed the Spin button. I don't think that's possible. Once you hit the Spin button, you committed to the wager and the machine committed to resolving the wager. And there's no backsies.

I suppose if something happened that prevented the machine from being able to resolve your wager, the casino would have to refund the bet. I can only think of bizarre scenarios that would cause a machine to fail this way — like someone driving a spear through the logic board.

Slot machines are amazingly fault-tolerant devices. They're tested to withstand power surges, external shocks and radio interference. The software is tested to recover from events like power failures and resume right where they left off.

I once had a machine that decided it would be a good idea to reboot right before after I hit a button to spin the wheel in its bonus round. After a couple of minutes of boot messages appearing on the screen, the game screen came back and the program again asked me to hit any button to spin the wheel.

As for your second question, a couple of years ago IGT had a machine on which every spin paid something. Every spin did pay something, but of course the vast majority of the wins were less than your bet. I think it was called something like "Every Spin a Winner." I haven't seen it for about two years or so.


Question: I have a question about video poker. I am a bit confused about how a video poker machine deals the cards. After the initial deal of five cards, are the remaining 47 cards constantly being shuffled? And do you know how the new cards are dealt? If I discard cards that were in the first, third and fourth positions, does the first card that is drawn go to the first position or the first position that requires a card?

Answer: Way back decades ago, in my first programming class, we were taught one method to shuffle a deck of cards. Set up an array of 52 rows and store one card in each row. Get two numbers from 1 to 52 from the RNG and swap the cards at those positions. Repeat a few hundred or thousand times to create a shuffled deck in the array.

Now, this method simulates a physical deck of cards in the program. There's no reason for the program running a video poker machine to simulate a physical shuffled deck. It only needs to select cards at random.

We may say that the remaining cards are being shuffled, but what is really happening is that the replacement cards have not been selected yet and the RNG is continuing to generate numbers.

Video poker machines used to select all 10 cards that might be used in a hand when you hit the Draw button. A group of RNG cheats were able to cheat machines by developing a method to determine what the four cards waiting in the wings were. Video poker regulations were changed to specify that the machines can select only the five cards needed when you pressed the Deal button and could not select the replacement cards until you pressed the Draw button.

Video poker machine manufacturers don't release specific details about the algorithms in their machines because they don't want to make it easier for cheats to compromise the machines. So I'll speculate and describe one way the software might work.

The programmer has decided on some method to map the numbers 1 to 52 to the cards in the deck. For example, 1 through 12 might map to the ace through king of spades, 13 through 25 the ace through king of clubs, and so on. When you press the Deal button, the program gets a number from 1 to 52 from the RNG. That card is your first dealt card. The program maintains an array of 52 elements to indicate which cards have been dealt (we'll call it CardsDealt) and it stores a 1 in the element corresponding to the number from the RNG.

For example, say that the number from the RNG is 7. That's the 7 of spades. The program displays the 7 of spades in the first position on the screen and sets CardsDealt(7)=1.

Now get another number from the RNG for the second card to be dealt. Check the CardsDealt array element's value for that number to see if that card has already been dealt. If it has, get another number from the RNG. When the RNG returns a number corresponding to a card that hasn't been dealt yet, display the card in the second position and mark the card as dealt in the array.

Repeat for positions three, four and five in the dealt hand.

When it comes time to replace your discards, the program might repeat the process for each position that needs a replacement card. The program also might always select five replacement cards whether or not they're needed. The program might put the first replacement card in the first position that needs a new card. It also might replace cards based on the order in which they were selected, i.e., the first replacement card selected goes into the first position in the hand if needed, the second replacement card goes into the second position if needed, and so on. When the hand is over, set all the values in the CardsDealt array back to 0.

The bottom line is that the actual mechanics of the replacement process doesn't matter. As long as each card is equally likely to be selected at each stage, the deal is fair and we can calculate long-term paybacks and derive strategies.


John Robison

John Robison is an expert on slot machines and how to play them. John is a slot and video poker columnist and has written for many of gaming’s leading publications. He holds a master's degree in computer science from the prestigious Stevens Institute of Technology.

You may hear John give his slot and video poker tips live on The Good Times Show, hosted by Rudi Schiffer and Mike Schiffer, which is broadcast from Memphis on KXIQ 1180AM Friday afternoon from from 2PM to 5PM Central Time. John is on the show from 4:30 to 5. You can listen to archives of the show on the web anytime.

Books by John Robison:

The Slot Expert's Guide to Playing Slots
John Robison
John Robison is an expert on slot machines and how to play them. John is a slot and video poker columnist and has written for many of gaming’s leading publications. He holds a master's degree in computer science from the prestigious Stevens Institute of Technology.

You may hear John give his slot and video poker tips live on The Good Times Show, hosted by Rudi Schiffer and Mike Schiffer, which is broadcast from Memphis on KXIQ 1180AM Friday afternoon from from 2PM to 5PM Central Time. John is on the show from 4:30 to 5. You can listen to archives of the show on the web anytime.

Books by John Robison:

The Slot Expert's Guide to Playing Slots