Discount Gambling

Counting CSM Blackjack (+EV)

Posted in +EV, blackjack, csm by stephenhow on July 27, 2012

A few people have asked me about the countability of blackjack dealt from a constant shuffle machine (CSM). I’m a big advocate of counting the CSM, especially for card craps, because of the ease of the windowed count. Even if the dealer collects no muck (i.e., immediately shuffles completed hands back into the CSM), you’ll still be +EV more than 8% of the time for good BJ rules. It’s a lot easier to count a CSM than a shoe. I call it counting for the ADHD crowd. All you have to do is pay attention to the last 16 cards (or the collected muck) fed into the CSM before the hand is dealt. Plus, you’ll probably never get backed off from CSM blackjack, even when wildly varying your bets.

EV vs. Windowed Count

I use my model of the ShuffleMaster 126 (source) CSM in the blackjack simulations for this post. I’ve talked in detail about this model before, in my posts on card craps. Basically, there’s a buffer of at least 16 cards in the chute (so the dealer never waits for a card), which introduces state into the system. If the dealer collects no muck, you simply use the running count of the last 16 cards fed into the shuffler. Use the simple hi-lo count (2-6 are +1, 10-A are -1). If the dealer collects a lot of muck, and feeds it all into the shuffler right before the next hand starts, then use the count of the entire muck.

For these simulations, I used 6 decks in the CSM, and typical-good H17 blackjack rules (3:2 BJ, late surrender, re-split Aces 3-times, double-after-split). My blackjack analyzer calculates the ideal EV for these rules at -0.445% for 6 decks. I ran the simulator head’s up against the dealer, and kept track of the 16-card windowed count and the subsequent hand outcome. I plotted the next-hand EV vs. the windowed hi-lo count in the graph below.

The graph shows a very linear relationship between the 16-card windowed hi-lo count and the EV of the next hand. When the running windowed count is +5 or more, the next hand from the CSM is +EV. The windowed count is ≥ 5 about 8.2% of the time.

Frequencies of 16-Card Windowed Counts
Count Frequency Approx. BJ EV
0 11.5% -0.44%
1 10.8% -0.34%
2 9.36% -0.24%
3 7.46% -0.16%
4 5.46% -0.05%
5 3.67% +0.04%
6 2.25% +0.14%
7 1.25% +0.22%
8 0.627% +0.29%
9 0.280% +0.43%
10 0.111% +0.49%


Serious card counters will tell you you can’t count a CSM. But the data above shows that a CSM goes +EV more than 8% of the time. Plus, it’s infinitely easier to count a CSM than it is to count a shoe. You can lose track of the count for a hand or two. As soon as you regain attention, you’ll know what the count is. You can probably vary your bets wildly without attracting any attention or interest from the floor. You can probably even Wong hands when the count is bad. Or less than +5.

Counting a CSM is great for the casual counter. It’s basically short-attention span counting. If you see the last 16 cards into the CSM prior to the deal are low (have a running count of 5 or better), then you’re +EV for the next hand. Even if you just see a net +3 count for the last 16 cards, you still know the next hand will be better than average. You can start/stop paying attention on a per-hand basis (unlike a shoe, where you have to wait for the next shoe if you lose the count).

At it’s simplest, CSM counting will tell you when the next hand will be better-than-average (half the time), or worse-than-average (half the time). So, if you Wong half of the time, you’ll only play the better-than-average hands (EV better than -0.45%; the above curve to the right of count=0), and miss the bad hands. That’s a quick way to reduce the house edge from 0.45% to 0.22% (only play 53% of the hands; wait until the count is ≥ 0).

7 Up Baccarat @ Marina Bay Sands, SG

Posted in baccarat, csm by stephenhow on June 16, 2012

In today’s Grail quest, I took a look at the countability of a Baccarat variant called 7 Up Baccarat, dealt out of a constant shuffle machine (CSM). If you’ve read this blog closely, you know that a CSM does not eliminate all countability in a game. This is because cards are in buffered in the exit chute of the CSM, so recently dealt cards have no chance of coming out soon. A windowed count may be effective against a CSM.

You can browse or download all the code for this post, if you want to see how I roll.

Anyway, here’s what I found for 7-Up Baccarat. Both the banker and player bets have very high sensitivities to removed cards (EORs). (Compare this to normal baccarat, where the EORs are effectively zero.) Simulations show a windowed count is strongly correlated to the EV of the next hand dealt out of the CSM. The figure below shows a 20-card windowed count tells you when its better to bet Player or Banker. Unfortunately, the count almost never gets good enough to be +EV. You can see if they made the game more “fair” (house edge only 1.3% instead of the chosen 2.6%), then you’d often find some +EV opportunities. I doubt they did this kind of analysis, but who knows.

Same thing with the Super-7’s side bet. If they made the nominal house edge closer to 5% than the 8.9% they chose, then it’d be very countable. The count is very simple. Any 7 you see is -12, and any non-7 is +1. I think everyone can imagine that it’s better to bet the Super-7’s when they haven’t seen any 7’s out of the CSM in the last few hands. And I’m sure no one bets Super 7’s just after seeing a bunch of 7’s come out. Simulation of the Super-7’s bet show a perfect linear correlation between the count and the EV of the bet. In all simulations, a minBufferDepth of 20 was used (minimum number of cards in the exit chute buffer).

Card Craps Simple Explanation

Posted in +EV, card craps, csm by stephenhow on June 10, 2012

I love the card craps at Viejas, not because I’m ever going to win any money there, but because it’s so obviously countable. However, it’s almost impossible to explain to anyone why the odds are different than dice, or why the game is countable. After all, they use a Constant Shuffle Machine (CSM) with 312 cards, right? So, once again, I’m going to explain how the card buffering in the exit chute of the CSM makes the game easily countable.

A picture is worth a thousand words. Example code and simulations are the proof of the pudding. All the code used in this example is available on github, where you can browse or download it.

You can read up on the details of card craps @ Viejas. Here’s how they play it. They use a normal craps layout, but replace the dice with two cards (1 thru 6), dealt out of a 312-card CSM. They take two cards out of the shuffler, call the roll, then muck the two cards back into the CSM. They allow 10x pass/dont odds on all points.

The reason why the CSM screws up the game (favors the dont’s) is that on the comeout, the two cards that just made the point have no chance of coming out on the next roll. Nor do they have any realistic chance of coming out in the next few rolls. This is because a CSM buffers a dozen or more cards in the chute where the dealer pulls the cards from. This buffer is necessary to deal blackjack. (Imagine the dealer waiting for the machine to drop one shuffled card at a time.)

Dice Baseline

Ok, so download the example code, compile and run it with the -d option for normal dice. The results are just as you’d expect. The pass line returns -1.42%, and the dont pass returns -1.36%, and odds and counting don’t make any difference:

>./cardcraps -d
using normal dice
1665000000 games:
pass flat: -0.0142, pass10x: -0.0144, pass w/count: -0.0142,
dont flat: -0.0136, dont10x: -0.0134, dont w/count: -0.0135

It takes billions of games to settle out the averages (especially when playing 10x odds), so don’t worry about the 1/100th of percents.

A) 36-Card Deck Is Same As Dice

At Pala Casino, they use a 36-card deck (one card per roll), and a simple deck shuffler. No buffer. Each card has a picture of two dice. The shuffler spits out one card from the red deck, one card from the blue deck. The player “roll” chooses between the blue or red card. Exact same odds as craps. At Pala, no one ever says anything like “How many cards are in there?”, or “This machine deals a lot of sevens!”.

B) 2-Card Roll Hurts Pass Odds

Now, let’s try the case B in the above diagram. We use the -c option to select an ideal shuffler, and -m 0 option to indicate no buffered cards in the chute.

>./cardcraps -m 0 -c
using CSM with 52 dice sets, and minBufferDepth of 0 cards
1265000000 games:
pass flat: -0.0137, pass10x: -0.0266, pass w/count: -0.0170,
dont flat: -0.0137, dont10x: -0.0053, dont w/count: -0.0075

This shows that even without a buffer, making a dice roll from two cards out of a perfectly shuffled 312-card shoe favors the don’t pass odds. You can use a simple spreadsheet to show this. The point is that you’ll distort the well-known dice roll distribution by using 2 cards dealt from a shoe. It’s a simple exercise to prove (a simple spreadsheet will give you the exact numbers).

Note the pass line player loses more by taking odds. The don’t pass player improves his return by laying 10x odds. That doesn’t happen in a regular dice game. In a dice game, taking or laying odds is fair (0 EV).

C) CSM Is Countable

At Viejas, they use a ShuffleMaster 126 CSM loaded with 312 cards. If you ever open the top (used to happen a lot when they had jams), you’ll see a buffer of approximately 16 cards in the exit chute. This distorts the game, and in general favors the Don’t Pass odds. Sometimes, a good count makes the pass odds +EV.

We’ll run the simulator for the CSM with a minimum buffer depth of 16 cards:

>./cardcraps -m 16 -s
using model of ShuffleMaster 126 CSM with 52 dice sets, and minBufferDepth of 16 cards
using window size of 6 rolls
2083000000 games:
pass flat: -0.0147, pass10x: -0.0420, pass w/count: -0.0011,
dont flat: -0.0126, dont10x: +0.0042, dont w/count: +0.0130

Now you see the pass line player is severely penalised for taking odds. I don’t think someone taking 10x odds on every point would think they’ve increased the house edge from a nominal 1.4% to a whopping 4.2% (of the flat bet). And we see that a don’t pass player laying 10x odds on every point now has a small 0.4% advantage over the house. Of course, there’s a lot of variance laying 10x odds to win an average (0.4%)(flat bet). Using a simple (and fun!) count, the don’t player has a 1.3% advantage over the house.

You can use the -v option in the cardcraps program to generate the statistics on the odds bet vs the count for each point. I ran the program, and plotted the results (don’t pass odds advantage; pass odds are inverted):

The correlation between the count and the next roll out of the CSM is clear. The count is simple and important! Quite often, you have a +/- 1-2% advantage in laying odds or taking odds. Where else can you play a craps game where the previous 6 rolls have a significant effect on the next roll?! The graph was generated with a fair simulator (using a Mersenne Twister 64-bit PRNG with a period of 2^19937-1).

Even though the game is +EV, the edge is small relative to the variance. No one will grind out any money from this game. However, it is a lot of fun to watch the rolls, know the count, and guess the outcome. Plus, the game is dealt on a table, so you get to sit and watch the rolls. And it’s probably 10x faster than a craps game with dice. You could get a roll every 5 seconds if you’re heads up with the dealer.

The count provides a fun, small predictor of the next roll out of the CSM. If you like counting, and/or predicting the next roll in craps, then you have to check out the card craps game. Here’s a video that shows how I play the game @ Viejas:

New Card Craps Practice Game

Posted in +EV, card craps, csm by stephenhow on February 21, 2011

The best way to understand counting for card craps is to see it in action. I wrote a new practice game to demonstrate counting against the point, and when it’s correct to lay odds with your Don’t Pass bet. The game is configured with the Viejas parameters (10x odds, 312 cards in a ShuffleMaster 128 CSM) so if you’re planning to check out the game, practice here first! Sometimes I just like watching the rolls, so I also included an “Auto” mode to continuously play by itself. This might give you an idea of session variance, and what to expect if you actually decide to play 10x odds.

Click on the screenshot below to play:

I like watching all the animation and highlighting. It’s a lot more fun to run the game in a browser window, and occasionally see how it’s doing, than it is to sit and grind it out at Viejas all day 🙂