A from-scratch blackjack engine and research playground. You can use it to measure how much edge exists, how to take advantage of it, and what the house does to stop it. The trainer (top right) lets you practice the key aspects of advantage play: counting, playing decisions, and bet sizing.
The results presented here were produced using a blackjack engine built from scratch in Python. The engine accommodates different rulesets, card counting strategies, realistic casino shuffles, bankroll management, heat detection, dummy players, and a composition-exact perfect-play solver.
Every result is Monte-Carlo: they are run over many independent shoes and reported as a mean with a 95% confidence interval, so you can separate a real effect from noise. Each figure's caption notes the sample size behind it. My precomputed experiments are organized across the different tabs. You can run your own experiments by downloading the code-base from GitHub.
A counter bets more when the deck is rich. Could smarter per-card weights beat the crude Hi-Lo count?
The Hi-Lo count tags every card with a clean +1, 0, or −1. The best weights — each card's true effect of removal on your edge — are real numbers, not integers. So does using the optimal weights (ORACLE) actually win more money than Hi-Lo (COUNT)?
They sort hands by edge essentially identically. To see why, here are the actual weights, all on the same scale:
If betting is already optimal, where's the unrealized edge? In how you play the hands.
Basic strategy only knows your total and the dealer's upcard. A perfect player would use the exact remaining composition to make every hit/stand/double/surrender decision. The gap between the two is the playing ceiling, and it grows as the shoe is dealt out and the composition evolves.
This solver respects H17/S17 and deck count and matches the no-surrender game shown here. It does not model splits, so it is the no-split playing ceiling.
ORACLE is the best possible betting and CEILING is the best possible playing. An ideal player would do both at once: bet the optimal spread and play every hand composition-perfectly. How much is that worth, and where? It turns on how many decks are in play.
Counters memorize the Illustrious 18. How much do those deviations actually earn, and do the decades-old thresholds still fit today's rules?
An index play is a count-triggered exception to basic strategy: stand on 16 vs 10 once the true count reaches 0, take insurance at +3, and so on. To measure what the whole set is worth, three counters with identical Hi-Lo bet spreads sat at the same table on the same shoes: COUNT0 plays no deviations, COUNT plays the textbook Illustrious 18, and COUNTX plays thresholds re-derived from this engine for the exact ruleset. Here is what each one earns over the house:
The textbook numbers were computed decades ago, mostly for games where the dealer stood on soft 17. So every index is re-derived from the engine: for each play, compute the exact EV of both actions across thousands of sampled shoe compositions, regress the EV gap on the true count, and read off the count where it crosses zero. Where the rules agree, the engine lands on the classic values almost exactly, which is a nice validation of both. Where the rules differ, the corrections are real: in an H17 game you should double 10 vs A a full count earlier than the book says, and keep standing on 12 vs 6 much deeper into negative counts.
Notation: a play like "16 v T" means your hard 16 against a dealer ten upcard (T is any ten-value card: 10, J, Q, K). The first thirteen plays trigger when the count rises high enough; the last five flip the other way, turning a basic-strategy stand into a hit when the count falls low enough.
| Play | Your hand | Dealer shows | Deviation | Hi-Lo index |
|---|---|---|---|---|
| Insurance | any | A | take insurance | +3 and up |
| 16 v T | hard 16 | T | stand instead of hit | 0 and up |
| 15 v T | hard 15 | T | stand instead of hit | +4 and up |
| T,T v 5 | pair of tens | 5 | split instead of stand | +5 and up |
| T,T v 6 | pair of tens | 6 | split instead of stand | +4 and up |
| 10 v T | hard 10 | T | double instead of hit | +4 and up |
| 12 v 3 | hard 12 | 3 | stand instead of hit | +2 and up |
| 12 v 2 | hard 12 | 2 | stand instead of hit | +3 and up |
| 11 v A | hard 11 | A | double instead of hit | +1 and up |
| 9 v 2 | hard 9 | 2 | double instead of hit | +1 and up |
| 10 v A | hard 10 | A | double instead of hit | +4 and up |
| 9 v 7 | hard 9 | 7 | double instead of hit | +3 and up |
| 16 v 9 | hard 16 | 9 | stand instead of hit | +5 and up |
| 13 v 2 | hard 13 | 2 | hit instead of stand | below −1 |
| 12 v 4 | hard 12 | 4 | hit instead of stand | below 0 |
| 12 v 5 | hard 12 | 5 | hit instead of stand | below −2 |
| 12 v 6 | hard 12 | 6 | hit instead of stand | below −1 |
| 13 v 3 | hard 13 | 3 | hit instead of stand | below −2 |
Listed in Schlesinger's value order with the classic textbook indices, which is what COUNT plays. 11 v A is listed at +1 but is moot in an H17 game, where basic strategy already doubles it.
The Illustrious 18 are all hard-total, insurance, and split plays. Surrender has its own short list: Schlesinger's Fabulous 4, the four most valuable count-triggered late-surrender deviations. They only matter at tables that offer surrender — and because every figure on this page assumes no surrender (most casinos don't offer it), none of them affect any result above. They're listed below for completeness.
| Play | Your hand | Dealer shows | Deviation | Hi-Lo index |
|---|---|---|---|---|
| 14 v T | hard 14 | T | surrender instead of hit | +3 and up |
| 15 v 9 | hard 15 | 9 | surrender instead of hit | +2 and up |
| 15 v A | hard 15 | A | surrender instead of hit | +1 and up |
| 15 v T | hard 15 | T | surrender instead of hit | 0 and up |
Textbook Hi-Lo indices. With surrender off — the assumption behind every figure here — these never trigger, so the engine's COUNT strategy plays only the Illustrious 18 above.
Hi-Lo tags every card +1, 0, or −1. Serious counters use heavier systems. What do they actually get you?
Hi-Lo is a level-1 system: its tags are only ±1 and 0. Level-2 systems (Hi-Opt II, Zen, Omega II) widen the tags to ±2, and level-3 systems push to ±3, so the count can track the deck's makeup more finely. The exact tags per card:
| System | A | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | T,J,Q,K | Level |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Hi-Lo | −1 | +1 | +1 | +1 | +1 | +1 | 0 | 0 | 0 | −1 | 1 |
| Hi-Opt II | 0 | +1 | +1 | +2 | +2 | +1 | +1 | 0 | 0 | −2 | 2 |
| Zen | −1 | +1 | +1 | +2 | +2 | +2 | +1 | 0 | 0 | −2 | 2 |
| Omega II | 0 | +1 | +1 | +2 | +2 | +2 | +1 | 0 | −1 | −2 | 2 |
All four are balanced: the tags sum to zero over a full deck, so the running count is divided by decks remaining to get a true count, exactly as in Hi-Lo. Hi-Opt II and Omega II ignore the ace for playing accuracy (the ace acts like a small card once you are drawing) and pay for it on the betting side.
Want to try keeping one of these counts yourself? The counting trainer deals a live shoe in any of the four systems and quizzes you on the running count.
The natural question is whether a finer count simply wins. It does not, because a count does two different jobs and no single count is best at both:
The heavier systems are designed to raise playing efficiency, and they succeed, but they give up some betting correlation to do it. The two goals pull in opposite directions:
A real casino shuffle isn't truly random. Can you exploit what it leaves behind?
Counting throws away the order of the cards. A shuffle tracker doesn't: it learns the dealer's exact shuffle (riffles, strips, a cut) as a position-transition matrix, then predicts where clumps of high cards will land in the next shoe and bets up right before they're dealt.
Step by step:
The "full knowledge" caveat: a human tracker can only follow a slug or two of the discard pile, not all of it, so the real-world version captures a fraction of what's shown here.
The counter's edge is fragile. Which rules and conditions erase it?
Start with what makes counting work at all: the true count has to actually move. You only profit by betting big when the deck is rich, so what matters is how often, and how far, the count wanders away from zero.
That movement is also the first thing a casino takes away. The counter's main edge is penetration: the deeper the dealer deals before reshuffling, the more the count can swing and the bigger the edge:
Now the countermeasures a casino actually uses:
A positive edge still goes broke if you bet too big. How big is too big?
Bet a fraction of the growth-optimal (Kelly) amount. More aggressive means faster growth, but increases the risk of ruin.
The same story pictured a different way: 120 simulated bankrolls each on a log scale:
Surviving the variance is only half the battle — even a well-funded bankroll waits a long time for the edge to surface. The number that captures this is N0: the count of hands at which your expected profit equals one standard deviation of your results — the point where you're first reliably (about 84%) ahead. Below it, a genuinely winning player routinely sits at a loss. It's the sample size of advantage play: expected profit grows linearly with hands while the noise grows only with the square root, so the edge always wins eventually, just slowly. And because N0 scales as variance ÷ edge2, the single biggest lever on how slowly is the game you sit at.
That range is why serious players are obsessive about game selection. A 6-deck shoe with a full spread is a real grind — roughly 59,000 hands, on the order of 600 hours at a brisk pace, before the edge reliably outruns the variance. Move to the double-deck game an advantage player actually hunts for and it drops to about 9,000 hands (~90 hours); a single deck, ~4,000. Deeper penetration and back-counting (wonging) pull it down further still. So the discouraging six-deck figure isn't “how slow counting is” — it's how slow the worst common game is, and choosing a better table is the cheapest fix there is.
A counter is beaten not by the odds but by getting barred. How hard can you push?
Here is why the pit is the binding constraint. A counter's profit doesn't come evenly off the table; it comes almost entirely from the rare hands where the count is high and the big bets go out:
So the money lives in a handful of big bets, and a big bet that reliably appears exactly when the count is high is precisely what the casino looks for. It watches how steeply your bets track the count: spread harder and you earn more per hand, but you're spotted and backed off sooner. The quantity that matters is total profit before you're barred.
A common fallacy: a bad player at the table burns the good cards. True?
It may feel true, but over many hands, their decisions just remove random cards, which cancels out. The same logic dispatches the related myth that the player at third base (last to act) "steals the dealer's bust card" by hitting when they shouldn't: that card is as likely to have helped the dealer as hurt them, so across many rounds it washes out. A card a stranger draws is a card you simply got to see — and since you count it, it carries exactly the same information whoever it lands in front of.
The flat line above is the per-hand edge, but throughput interacts with strategy in a way that flips the usual intuition. A back-counter (wonger) only sits in when the count is high and watches from the rail otherwise. Heads-up against the dealer, sitting out nearly freezes the shoe — only the dealer's two-or-three cards come out each round — so you wait through bad counts at a crawl, and the shoe reshuffles before it ever gets rich. Add a few other players and the shoe keeps draining while you sit: the cards you're waiting for arrive, and favorable counts actually materialize before the cut card. A crowded table is a back-counter's friend.
Two smaller real effects cut the other way. A full table is cover — the pit has more people to watch and you blend in — but you also can't always get a seat at the exact moment the count spikes, and a wonger who can't take an open chair captures nothing. So other players trade a little entry timing for a lot of camouflage and a shoe that actually moves.
Every tab so far isolated one idea. What does a real advantage player do, and how does it actually go?
One more refinement before the full picture. A counter doesn't have to play every hand. Wonging (named after Stanford Wong) means watching the count from behind the table and only sitting down to play when it turns positive, skipping the negative shoes entirely.
Now stack the whole toolkit into one player and turn the casino back on. A single Hi-Lo counter, with the full Illustrious 18 and wonging out below true count −1, bets a 1–12 spread sized as half-Kelly of a finite 300-unit bankroll, at a 6-deck table with a realistic hand shuffle, two other players, and a pit watching the bet-to-count slope and barring counters. Each line below is one simulated career, colored by how it ends:
Want to try the first skill yourself? The counting trainer deals a live shoe and quizzes you on the running count.
Built in Python (NumPy + Matplotlib). Full engine, experiments, and figure-generation code on GitHub.