Ray Echevarria

Data Analytics Professional

Blackjack Game Outcome Probabilities by Monte Carlo Simulation

Project Overview

This was a final project I worked on for my Simulation (ISYE 6644) course as part of the Georgia Institute of Technology’s Master of Science in Analytics program. Above is a simple dashboard created in Google’s Looker Studio that allows you to toggle between different Blackjack strategies, the player’s initial hand, and the dealer’s show card. The combination of selected dimension values shows the game’s outcome probabilities. To better understand what all of these dimensions mean, how they work, and even further understand a game of Blackjack’s probable outcomes, read on. 

Abstract

Blackjack is a card game, typically played in casinos where players place their bets to play by themselves or with other players against the house. This work focuses on simulating many rounds of a Blackjack game to determine the long-term odds for a player and the house. Various strategies and game setups were tested to see if there are ways to increase the odds of winning and give the player an edge. After 4 million simulations were run across all strategies and game setups it was a very clear outcome, the long-term odds of winning a game of blackjack are heavily lopsided in favor of the house. The bottom line is that this game should strictly be played for enjoyment.

Background

 

Overview

Blackjack is a card game commonly played in gambling casinos (often referred to as the house). This is a widely known card game that players can place bets and make decisions based on the given circumstances of the hand dealt and where the dealer always wins in the end. Blackjack at face value is a rather simple game to understand. But given the mechanics of the game, the choices the players face, the information they have at their disposal for decision-making, and the player’s own emotions, many factors can determine the outcome of a given hand. Most if not all these factors play more and more into the probability of the dealer making out with the player’s money and winning the hand. To better understand the game’s mechanics and ultimately the outcome probabilities of the game we will walk through the methods of building a simulation to understand potential game outcomes. Review the results of these simulations to understand if players ever stand a chance, and if changing certain aspects of the standard game strategy can help players gain an edge, and lastly conclude whether people can expect to make money or lose money when playing this game. Let’s begin with the methodology deployed to build a program that can allow us to simulate the game.

Methodology


To best understand Blackjack’s long-term odds for the player many game simulations had to be run. To do this quickly and accurately a program was written to loop through many simulated rounds of a Blackjack game. This program was written from scratch in Python code (check out the program code here), the program allows one to loop through any number of loops as determined by the person running the simulation. Once determined, the program runs through the set loops, it processes through the following general steps:

1.     Deals cards to players and dealers from a single deck.

2.     Processes the player’s logic based on the face-up card shown by the dealer.

3.     Processes dealer’s logic as based on the standard rules, although these rules may vary by casino and determined strategy.

4.     Lastly, the program goes through the final hands and assigns that game a win, lose or draw.

5.     Throughout the simulation, the code is capturing certain points of data to allow for game and strategy analysis.

Although the program works through a basic game of Blackjack as intended, there were certain considerations and contingencies taken with the program’s setup. The explanations for these considerations can be found below.

Project Code Contingencies and Considerations:

The provided code simulates a very simple round of a Blackjack game, to simplify the game while still maintaining the mechanics of the game, the following adjustments were made:

       The standard strategy for the simulation follows the rules laid out here: https://bicyclecards.com/how-to-play/blackjack/.

       This simulation does not incorporate monetary considerations, it instead purely looks at the outcomes of a game, Win, Lose, Draw.

       The standard strategy tested only utilizes 1 deck of cards, even though the code can handle multiple decks.

       The simulation only considers the dealer and one player.

       The simulation does not handle a double-down, this is because the simulation is intended to collect game outcomes and not monetary gains, doubling down is essentially the player hitting one last time and doubling their bets.

       The simulation does not handle splits, this is because splits simply create another hand to play with which may change the outcomes of a game, therefore splits are not considered.

       The simulation does not handle cases where either the player or the dealer starts with or ends up in a case where they have 2 or more Aces in their hand. This opens the logic to extensive decision-making since an A can count as a 1 or an 11. Because this case is a very rare instance it would not be counted in the simulation.

Beyond the considerations and contingencies, multiple strategies and game setups were tested, which can be found below:

       The first simulated strategy is the standard strategy for the simulation following the rules laid out here: https://bicyclecards.com/how-to-play/blackjack/.

       The second change to the simulation was playing the standard strategy but instead of playing with 1 deck, playing with 6 decks.

       The third change to the simulation is deciding when to stop asking for more cards from the player’s decision point of view, this strategy considers stopping after the player has reached a combination of cards totaling 16 or more.

       The fourth change to the simulation is deciding when to stop asking for more cards from the player’s decision point of view, this strategy considers stopping after the player has reached a combination of cards totaling 18 or more.

With this, the program was run, and the Blackjack setup was simulated 1 million times for each strategy shared above, the results and findings were as follows.

Results & Findings

 

There were multiple strategies tested with the simulation program created, from the looks of it there isn’t much that can be done to gain the edge over the dealer. However certain decisions can help improve your odds slightly in given scenarios. Before the various tested strategies are discussed, here are the outcome probabilities for the standard strategy:

blackjack_game_outcome_probabilities

Figure 1

 

It is very clear, that if you follow the standard Blackjack strategy your probability of winning is ~40.67% as seen in Figure 1 above. Because when you draw in a game no money is made nor is money lost, this allows players to re-bet that money and insert it into the win/loss probability above which is more likely to be lost than won. On the opposite side, the casino has the upper hand as its odds are flipped, their winning probability is 50.55% whereas its losing probability is 40.67%. It is very clear that if the standard strategy is followed, your long-term odds are stacked against you. But is there something that can be done to remedy those odds?

 

Below are the game outcomes for the various strategies tested, with one of those being having 6 decks at play.

Figure 2

 

The above Figure 2 shows the different probabilities of winning, losing, or drawing for a given strategy. This shows that if the player were to continue to draw cards until their hand value is at 18, they have a slightly higher chance of winning compared to the standard strategy, about the same chance of losing and a lower chance of drawing with the dealer. Although this improves your odds of winning, you are still faced with the fact that your highest probability is that of losing a round (50.67% for the draw until your hand is 18 strategy). Although you can give your chances of winning a small boost by making a subtle change to the play, the casino continues to have the upper hand.

 

One thing to note is that these probabilities are for the strategies as a whole, but what about individual hands for a given strategy? Can certain hands lead to higher probabilities of winning given a certain strategy?

Figure 3

 

The above figure shows what the probabilities of a given outcome are for a player’s final hand value. This can help determine whether risking an additional hit or staying would make sense at the current hand value the player is in given the probability of winning for that hand value.  This simply shows that the closer to 21 you are the more likely you are to win a given hand because getting closer to 21 is less and less probable, this begins to explain why the dealer has the upper hand. Staying with lower-valued hands greatly increases your probability of losing but continuing to hit at the wrong time can lead to busting past 21 and losing the hand immediately.

 

Something else to consider is the outcomes based on what the dealer is showing since the dealer’s show card largely dominates the player’s decision-making. Below is a graph detailing the game’s outcome probabilities based on the dealer’s show card.

Figure 4

 

These very interesting outcomes clearly show that the most likely show card to yield the highest probability of winning is a 6. Most show cards from the dealer are less than 50% likely to lead to a winning hand, which clearly shows how unlikely a player is to win a hand of Blackjack.

Conclusions

 

Learnings:

A player’s outcome probability is dominated by three forces, the hand they got, the strategy deployed according to that hand, and the dealer’s show card and how they respond to it. Because the dealer waits to draw their cards after all players have drawn theirs, players could have gone bust by that point or have decided to stay in hopes the dealer themselves busts or stops drawing. It also doesn’t help that the dealer is obligated to stay with a soft 17 hand giving them a value to hold off from therefore reducing their chances of busting. There are simply too many subtle advantages baked into the mechanics of the game that favor the dealer. Even though their winning probability is 50% < x < 51% their probability of tying makes it so that their probability of losing is much less than their probability of winning. It is highly recommended that anyone that plays Blackjack clearly understands this and plays purely for enjoyment and not to make money, the odds are heavily stacked against the player.

 

Future Considerations:

If given more time, certain improvements could be made to the program as well as additional strategies tested. For example, adding the functionality to the program to incorporate multiple players to see how this impacts various outcomes. Also, handling the case where multiple A’s are in a player’s or dealer’s hands would fully round out all possible scenarios in each hand of Blackjack. Also considering the addition of doubling down or splitting would make it so that all tools available to players are considered in the simulation. There are also additional strategies that can be tested like hitting till 19, or 20 for example to see if the winning probabilities continue to increase or if decreases are observed. Lastly, one simple addition that could be made to the program is the incorporation of money, to better understand how many hands away a player is from losing their money and what that distribution looks like.

 

All in all, this was a fun project to put together, with the main learning being, never to play Blackjack with any money you are not willing to lose since you will likely lose it. If any money is earned playing Blackjack, get up and leave and buy yourself something nice!

Have Some Feedback?