I am currently researching the mathematical modeling of Blackjack and how the Basic Strategy is derived. Michael Shackleford often mentions that his results are exactly calculated rather than simulated. Especially his results of the house edge calculator makes me ask, how exact these numbers are. My question is:
What methodology is used to compute the Basic Strategy exactly?
Is it based on complete recursive expected value calculations?
In particular, how are the computational challenges of splitting handled? John Nairn (2019) (Exact Calculation of Expected Values for Splitting Pairs in Blackjack) describes overcoming this problem using dealer-caching and pre-enumeration to reduce the state space — is a similar or different approach applied here?
Any insights or references would be greatly appreciated.
https://youtu.be/jCF-Btu5ZCk
The infinite deck approach is somewhat simpler than a finite deck approach. In general, I believe one would define an array containing an element for each card in the source deck, remove dealt cards from consideration, and then iteratively calculate what would happen for each possible hit card.
Basically, the easy way to calculate uses a program that handles each special case (like splitting).
Simulation does the basically the same thing, but for a random sampling of possible cases. Calculation evaluates all cases.
There are serious shortcuts available if you don't care about suits, and don't mind grouping all the ten-value ranks.
OP is asking about how gaming mathematicians calculate the composition-dependent probabilities for split hands (with re-split up to n times).
For example
In the Composition Dependent Combinatorial Analyzer (cdca) at bjstrat.net the EVs for splitting and resplitting 88 versus 7 with 6 decks are:
First split hand, SPL1: 0.1711
2nd split hand,SPL2: 0.2509
3rd split hand, SPL3: 0.2604
More impressively the EVs for splitting and resplitting 22 versus 4 with 6 decks, S17, are:
First split hand, SPL1: 0.3762
2nd split hand,SPL2: 0.3634
3rd split hand, SPL3: 0.3615
Not only are these fresh deck composition-dependent calculations reported but if you remove cards from the composition of the deck the CDCA calculates different results.
The OP's question is an excellent one: How does this get calculated? And, how does the Wizard calculate his House Advantage results for resplit one, two and three times?
1. For an infinite deck game, what are the respective numbers for 8, 8 vs. 7?
SPL1: 0.1711;
SPL2: 0.2509;
SPL3: 0.2604;
SPL4: ?
SPL5: ?
…
SPL Infinite: ?
2. These SPL EV numbers assume you must split 5 times whenever available in SPL5. They are not split-up-to-5-times numbers.
Quote: BasisHello,
I am currently researching the mathematical modeling of Blackjack and how the Basic Strategy is derived. Michael Shackleford often mentions that his results are exactly calculated rather than simulated. Especially his results of the house edge calculator makes me ask, how exact these numbers are. My question is:
What methodology is used to compute the Basic Strategy exactly?
Is it based on complete recursive expected value calculations?
In particular, how are the computational challenges of splitting handled? John Nairn (2019) (Exact Calculation of Expected Values for Splitting Pairs in Blackjack) describes overcoming this problem using dealer-caching and pre-enumeration to reduce the state space — is a similar or different approach applied here?
Any insights or references would be greatly appreciated.
link to original post
It really is just probability theory. The computer runs through all possible cards you and the dealer could get, evaluates the result, and multiplies that by the probability of getting those cards. That's why basic strategy varies a little depending on the rules. More decks results in the probability of getting another card of a particular rank not changing as much as fewer decks. With infinite decks, the probability of getting another card of a particular rank is a constant (1 in 13 for anything other than tens, and 4 in 13 for the tens).
For any given two cards that you start with, the expected value of hitting or standing varies a little depending on the rank of those two cards (it matters less the more decks are in play). In most cases it won't matter what the card ranks are. Occasionally it will. This would be perfect strategy. Say your hand is hard 12 vs 4 (playing single or double deck). The perfect strategy for that one will depend on whether your 12 contains a 10 or does not contain a 10 (hit if 12=10+2; otherwise stand).
The basic strategy for 12 vs 4 is to calculate the expected value of hitting a 10+2 times the probability of getting a 10+2 (given that you have something that is a hard 12), PLUS the expected value of hitting a 12 (not 10+2) times the probability of getting NOT 10+2 (given that you have something is a hard 12). Do the same for standing. The result is "stand on 12 vs 4". In other words, it's the "average" hard 12.
See this for split calculations: (about halfway down the page)
https://wizardofodds.com/ask-the-wizard/blackjack/probability/
1. Simulation - stochastic method which requires a large number of trials to get answers with small enough error bars such that 5 or more digits of accuracy are attained. The collection and reporting of individual hands such as split pairs would need to be built into simulator design.
2. Combination math - usually using an excel spreadsheet or computer language. Involves listing all the possible hands. The file sizes can become prohibitively large for hands involving splitting because of the number of cards that can potentially be involved, therefore recursive approximations are typically used for those hands in which player is splitting and resplitting pairs.
3. Looping codes - Computer code with multiple nested loops which create every possible (player+dealer) hand in turn and evaluates them and accumulates aggregate outcomes such as EV. Does not require the massive file sizes of the combination math approach but instead requires lengthy run times. Collecting information on certain categories of hands clearly requires pre-planning when applying this approach.
Some years ago, Wizard seems to have shifted over to looping codes. I don't claim to know how he handles split pairs within his looping codes.
There are commercial codes that simulate blackjack, including depleted compositions of shoes. Again, a bit unsure whether they can be configured to be used to accumulate information on the EV of split pairs. There are quite a number of math guys in WOV forum here who can write and operate their own simulators. Of course, each simulation is specific to the defined set of rules and starting shoe composition.
There are composition dependent hand calculators on the WOO site and on the Bjstrat.net site with which to analyze EV to 6 digits and 4 digits respectively. I have written a suite of spreadsheets for my personal use that allow me to specify the composition of a shoe and calculate house edge and ROIs (to 4-5 significant digits) based on optimized player strategies for all player situations - but when it comes to splitting and resplitting pairs at some point I have to approximate by using recursive methods.
I think the key to combination math analysis of BJ is the ability to write algorithms for the probability of dealer making a 17, 18, 19 20 21 and Bust given a face-up Ace, 2-9 or Ten and as a function of a vector that defines the number of remaining cards in the shoe with ranks of (Ace, 2-10) after the player has finished drawing to his cards. In my computational spreadsheets these algorithms defining the probabilities of dealer outcomes are not rigorously exact because, withs some exceptions, they only consider those cases in which dealer is drawing less than 8 cards to the face-up card.
I'd love to hear from Wizard, miplet, charliepatrick, and others as to what they do to address splitting and resplitting of pairs.
Quote: acesideThere are two questions here.
1. For an infinite deck game, what are the respective numbers for 8, 8 vs. 7?
SPL1: 0.1711;
SPL2: 0.2509;
SPL3: 0.2604;
SPL4: ?
SPL5: ?
…
SPL Infinite: ?
2. These SPL EV numbers assume you must split 5 times whenever available in SPL5. They are not split-up-to-5-times numbers.
link to original post
If you have an infinite deck game then the math is actually a lot easier, because when you split, nothing changes. Your chances of getting an 8 as the next card remain 1 in 13. So if it's correct to split them the first time, it remains correct to split them every time you get another 8.
Obviously you can't do an exhaustive calculation (because it would be infinite) but you can exactly calculate the EV of starting with a single first card 8 against a 7. Call this ev "x". The formula for x will contain x's -- in particular the it will contain the term (1/13 * 2x) -- but you will be able to solve for x in the normal way (collect like terms on one side of the equal sign)
I've written code to calculate the exact return of a blackjack game in the past (to analyze a game with a particular side bet that changed your main strategy). Dealing with limited splits, and deck composition, actually made things harder. If the deck composition never changes (which is the case for infinite decks) and you have unlimited splits it makes everything much simpler.
Additionally, I would be interested in knowing if anyone here has used coding to successfully calculate composition-dependent strategy for blackjack or any blackjack varieties?
Quote: SkinnyTony
If you have an infinite deck game then the math is actually a lot easier, because when you split, nothing changes. Your chances of getting an 8 as the next card remain 1 in 13. So if it's correct to split them the first time, it remains correct to split them every time you get another 8.
link to original post
This is exactly the part I’m confused. I posted this in another forum last year. Consider this particular hand of 10, 10 vs. 6 in an 8-deck Hit-17 game. Several authors have listed the split EV numbers:
SPL1: +0.588109;
SPL2: +0.494813;
SPL3: +0.455688.
Clearly, Stand is the correct strategy for this hand, but to reach this decision, these SPL numbers are needed for comparison. The SPL2 EV number assumes that player must split exactly 2 times whenever available. Here is the problem: if SPL2 is worse, why do we even do it? We just Stand for better.
Quote: harrisHas anyone attempted to find the optimal strategy for triple deck blackjack? I have seen it in California but I cannot find a strategy chart online. I imagine the strategy is a mix of the double deck and 4-8 deck strategy.
Additionally, I would be interested in knowing if anyone here has used coding to successfully calculate composition-dependent strategy for blackjack or any blackjack varieties?
link to original post
I’ve never seen a triple. If there is one, you just use the 4-deck strategy.
Quote: harrisHas anyone attempted to find the optimal strategy for triple deck blackjack? I have seen it in California but I cannot find a strategy chart online. I imagine the strategy is a mix of the double deck and 4-8 deck strategy.
Additionally, I would be interested in knowing if anyone here has used coding to successfully calculate composition-dependent strategy for blackjack or any blackjack varieties?
link to original post
I believe that the WOO site has a page on composition-dependent perfect strategy for a fresh deck or shoe. You know, Hit or Stand on various multicard 16vT, the difference between T2vs 4 and 93vs 4. Don't remember what else.
And, I've never heard of triple deck BJ. Sounds interesting.
Aceside - This is a math forum, we are against fun here ;)
Quote: acesideBlackjack is not an exact math, it’s an entertainment.
link to original post
. . . but this thread is about nerdy techniques for doing exact math, particularly on split pairs. If you want to discuss the infinite deck method may i suggest you start a thread on that topic?
Quote: acesideQuote: SkinnyTony
If you have an infinite deck game then the math is actually a lot easier, because when you split, nothing changes. Your chances of getting an 8 as the next card remain 1 in 13. So if it's correct to split them the first time, it remains correct to split them every time you get another 8.
link to original post
This is exactly the part I’m confused. I posted this in another forum last year. Consider this particular hand of 10, 10 vs. 6 in an 8-deck Hit-17 game. Several authors have listed the split EV numbers:
SPL1: +0.588109;
SPL2: +0.494813;
SPL3: +0.455688.
Clearly, Stand is the correct strategy for this hand, but to reach this decision, these SPL numbers are needed for comparison. The SPL2 EV number assumes that player must split exactly 2 times whenever available. Here is the problem: if SPL2 is worse, why do we even do it? We just Stand for better.
link to original post
I'm not sure I understand your question. We don't split, we stand with TT vs 6.
If we are splitting it's due to a very high count. Every time we get another T and have an option to split again, there's one less T in the deck and the EV goes down. So it may be correct to split once and then stop splitting if you get more T's (because the count is no longer high enough to justify it).
That's not a concern with infinite decks. The deck composition never changes in infinite deck; there's always a 4/13 chance of getting a ten-valued card. So for infinite deck, if it's correct to split the first time, it's correct to continue splitting.
This is more confusing now. I guess what I want to ask is: does SPL2 mean splitting exact two times, or splitting up to two times? In other words, I believe these SPL numbers should be:
SPL1: +0.588109;
SPL2: +0.588109;
SPL3: +0.588109.
Quote: gordonm888Quote: acesideBlackjack is not an exact math, it’s an entertainment.
link to original post
. . . but this thread is about nerdy techniques for doing exact math, particularly on split pairs. If you want to discuss the infinite deck method may i suggest you start a thread on that topic?
link to original post
The infinite and finite deck problems are actually twisted together, so I want to solve them all at once!
Quote: acesideLet me ask this again. If it is not correct to split the first TT vs 6, is it still not correct to split it the second time in the SPL2 situation?
This is more confusing now. I guess what I want to ask is: does SPL2 mean splitting exact two times, or splitting up to two times? In other words, I believe these SPL numbers should be:
SPL1: +0.588109;
SPL2: +0.588109;
SPL3: +0.588109.
link to original post
I have no idea what the numbers mean. You
wrote them and labeled them. I don't know where you got them from and I'm not sure what your labels mean.
What I'm saying is that in an infinite deck game the deck composition never changes so when you have TT v 6 it doesn't matter if the TT are your first two cards or if it's after several splits. The state is identical so the math is identical. In a game with finite decks this is not true, every split removes a T from the deck.
Quote: acesideLet me ask this again. If it is not correct to split the first TT vs 6, is it still not correct to split it the second time in the SPL2 situation?
This is more confusing now. I guess what I want to ask is: does SPL2 mean splitting exact two times, or splitting up to two times? In other words, I believe these SPL numbers should be:
SPL1: +0.588109;
SPL2: +0.588109;
SPL3: +0.588109.
link to original post
If you don't split the first time, you can't split the second time.
What is the value of standing?
For a one-card finger hand, 10 vs 6, the Hit EV=0.288. Therefore,
The Splitting one time (SPL1) EV = 0.288x2=0.576;
The Splitting two times (SPL2) EV = 0.288x(2+4/13)=0.664;
The Splitting three times (SPL3) EV = 0.288x((2+4/13+(4/13)^2)=0.691.
These EV numbers look good to me, but how to calculate the respective EV numbers in an 8-deck game? Please help!
Quote: acesideWe consider this hand, T,T vs 6, in a Stand-17 infinite deck game. The Stand EV=0.704.
For a one-card finger hand, 10 vs 6, the Hit EV=0.288. Therefore,
The Splitting one time (SPL1) EV = 0.288x2=0.576;
The Splitting two times (SPL2) EV = 0.288x(2+4/13)=0.664;
The Splitting three times (SPL3) EV = 0.288x((2+4/13+(4/13)^2)=0.691.
These EV numbers look good to me, but how to calculate the respective EV numbers in an 8-deck game? Please help!
link to original post
You calculate the EV by removing a 10 (changing the deck composition) after each card is dealt and recalculating.
So if have already split once and get another 10, the are now 3 tens gone and one 6 gone. So you calculate EV based on drawing from a deck with 31 6's, 253 ten-valued cards, and 32 each of 2-5 and 7-9.
This is big hassle but if you want exact numbers you have to do it. The infinite deck case is much easier because you only need to calculate everything once.
Having said that, the effect of a single hand's worth of cards is going to be negligible in an 8 deck game. This is why we have composition-dependent strategies for single deck but not 8 deck. But if you want truly exact EVs this is what you need to do.
Quote: acesideLet me ask this again. If it is not correct to split the first TT vs 6, is it still not correct to split it the second time in the SPL2 situation?
This is more confusing now. I guess what I want to ask is: does SPL2 mean splitting exact two times, or splitting up to two times? In other words, I believe these SPL numbers should be:
SPL1: +0.588109;
SPL2: +0.588109;
SPL3: +0.588109.
link to original post
Neither. SPL2 is the expected value of splitting when you currently have two split hands and the next card is of the same rank, thus giving you the option to split. That's why the last one is labeled SPL3, because the result would be four split hands.
Quote: acesideWe consider this hand, T,T vs 6, in a Stand-17 infinite deck game. The Stand EV=0.704.
For a one-card finger hand, 10 vs 6, the Hit EV=0.288. Therefore,
The Splitting one time (SPL1) EV = 0.288x2=0.576;
The Splitting two times (SPL2) EV = 0.288x(2+4/13)=0.664;
The Splitting three times (SPL3) EV = 0.288x((2+4/13+(4/13)^2)=0.691.
These EV numbers look good to me, but how to calculate the respective EV numbers in an 8-deck game? Please help!
link to original post
Going from infinite to finite, the probability for each draw card changes. With infinite decks, the shortcuts of 1/13 or 4/13 can be used; with 8 finite decks you probably need to start with 32/416 (128/416) and reduce the numerators appropriately for each previously played card.
https://youtu.be/jCF-Btu5ZCk?si=3_Hkx1Gh_L14ZVO8
Mike creates an Excel document that shows how the best basic strategy and house edge is derived.
Note: It’s for infinite deck, and there’s at least one small error - which is obvious. As I recall, he stated that it’s for dealer hits soft 17 and it’s not. Or maybe I got that backwards.
The point is, if you can follow along, you can create your own BJ Excel document… and then experiment with it.
Quote: Dieter
Going from infinite to finite, the probability for each draw card changes. With infinite decks, the shortcuts of 1/13 or 4/13 can be used; with 8 finite decks you probably need to start with 32/416 (128/416) and reduce the numerators appropriately for each previously played card.
link to original post
Kicking myself right now.
"Obviously" you need to adjust the numerator and denominator as cards are delivered; I'm thinking of only one way to handle the deck.
SPL2 EV = 0.597.
SPL3 EV = ?
I don’t know how to calculate SPL3 EV. I need help from you guys. Maybe I’ll ask DogHand for help too.
As to splitting, that gets more tricky. To keep it simple, let's say just one split is allowed. I play out one hand only and them multiply the expected value by 2. The program would simply take too long if I played out both hands.
Your Split one time (SPL-1) EV=0.568987;
Split two times (SPL-2) EV=0.347833;
Split three times (SPL-3) EV=0.507766.
Just by looking at the trend of variation, there seems to be a typo in the SPL-2 EV number.
BTW, I’ve consulted my mentor and found out the value of SPL-3 EV in an infinite deck game.
Quote: acesideYour Split one time (SPL-1) EV=0.568987;
Split two times (SPL-2) EV=0.347833;
Split three times (SPL-3) EV=0.507766.
link to original post
Shoot. Thanks for letting me know.
The only key difference is that in Triple Deck, you should double a 7+2 against a 2.
I also found some more obscure composition-dependent advice that isn't listed in the Wizard of Odds article in case anyone is interested :D
Also, other hands like 4,5 v 2 and 3,6 v 2?
5+4 and 6+3 vs 2 are Hits in triple deck S17 and H17
7,2 v 2;
6,3 v 2;
5,4 v 2.
Is it Double or Hit after averaging?