KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
September 19th, 2025 at 7:01:41 PM permalink
Just for fun, I'm writing a computer program to calculate the EV of all decisions for a hand of blackjack (EV of stand, hit, double down if allowed, and split if a pair). I'm running into a problem of how to deal with dealer up card of 10 or ace.

I'm doing single deck. If I take two cards out of the deck for the player, and one card for the dealer up card, and one card for the hole card, it makes it easy to handle dealer blackjack. If the dealer has 10 up and ace in the hole, or vice versa, the player loses. If not, dealer has no blackjack, so proceed. If the player chooses to hit, the probability of the next card being a particular rank 2-9 is 4/48 (or 3/48 if that card has been used once already, 2/48 if used twice). The probability of the next card being a 10 value card is 16/48 (or 15/48 if 10 has been dealt once, 14/48 if dealt twice, etc.)

The problem is that the EV varies greatly depending on the hole card. If I calculate stand EV and hit EV with the four cards initially dealt removed from the deck, and I say that perfect strategy is the greater of the two, then essentially I'm playing the game with the hole card face up. The hole card needs to be face down, because I'm not supposed to know what it is, yet it is there, and there are only 48 cards left, not 49, that the player could receive for hitting.

Maybe the way to handle this is as follows:

If dealer up card is 10, check the hole card. If ace, then player loses. If not, then put the card back into the deck and re-shuffle. This means that card is available for the player for hitting the hand (or double down). The probability of the next card being a 2-9 would then be 4/49, instead of 4/48 with the hole card removed (for ranks that were not initially dealt, otherwise 3/49, or 2/49, etc.)

When it's time for the dealer to play out his hand, remove all remaining aces from the deck (the player may have gotten one), and then pick a card to be the hole card. Say the player hit 9+5 and got a 4 (stand on 18). The deck originally had 52 cards, we removed a 9 and 5 for the player's first two cards, a 10 for the dealer up card, and a 4 for the player's third card. After removing the four aces from the deck (since dealer did not have blackjack), the deck has 44 cards left. The probability of the hole card being 2,3,6,7,8 is 4/44, the probability of the hole card being 4 or 5 or 9 is 3/44, and the probability of the hole card being 10 is 15/44. These probabilities total 1.

If the hole card is 7,8,9, or 10, then the dealer is done. If the hole card is 2,3,4,5,6, then the dealer needs to draw another card, which can be ace. Put all the aces back in the deck (now 47 cards) and draw a card.

Do a similar thing with dealer up card ace. Check the hole card, if it's 10, then player loses to a dealer blackjack. Otherwise, put the 10 back in the deck, have the player do his thing, then remove all 10's from the deck and have the dealer select a card as the hole card. If the dealer needs to draw a third card, put all the 10's back in the deck and proceed.

Would playing the game this way produce exactly the same results as the way it's actually done in real life where the hole card just sits there, face down?
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 19th, 2025 at 7:24:07 PM permalink
I don’t know how to calculate this, but I have softwares to give you all these EV numbers. Also, I should thank you for helping me to understand the pair splitting problems the other day.
SkinnyTony
SkinnyTony
  • Threads: 4
  • Posts: 179
Joined: Jul 22, 2025
September 19th, 2025 at 7:56:24 PM permalink
Quote: KevinAA

Just for fun, I'm writing a computer program to calculate the EV of all decisions for a hand of blackjack (EV of stand, hit, double down if allowed, and split if a pair). I'm running into a problem of how to deal with dealer up card of 10 or ace.

I'm doing single deck. If I take two cards out of the deck for the player, and one card for the dealer up card, and one card for the hole card, it makes it easy to handle dealer blackjack. If the dealer has 10 up and ace in the hole, or vice versa, the player loses. If not, dealer has no blackjack, so proceed. If the player chooses to hit, the probability of the next card being a particular rank 2-9 is 4/48 (or 3/48 if that card has been used once already, 2/48 if used twice). The probability of the next card being a 10 value card is 16/48 (or 15/48 if 10 has been dealt once, 14/48 if dealt twice, etc.)

The problem is that the EV varies greatly depending on the hole card. If I calculate stand EV and hit EV with the four cards initially dealt removed from the deck, and I say that perfect strategy is the greater of the two, then essentially I'm playing the game with the hole card face up. The hole card needs to be face down, because I'm not supposed to know what it is, yet it is there, and there are only 48 cards left, not 49, that the player could receive for hitting.

Maybe the way to handle this is as follows:

If dealer up card is 10, check the hole card. If ace, then player loses. If not, then put the card back into the deck and re-shuffle. This means that card is available for the player for hitting the hand (or double down). The probability of the next card being a 2-9 would then be 4/49, instead of 4/48 with the hole card removed (for ranks that were not initially dealt, otherwise 3/49, or 2/49, etc.)

When it's time for the dealer to play out his hand, remove all remaining aces from the deck (the player may have gotten one), and then pick a card to be the hole card. Say the player hit 9+5 and got a 4 (stand on 18). The deck originally had 52 cards, we removed a 9 and 5 for the player's first two cards, a 10 for the dealer up card, and a 4 for the player's third card. After removing the four aces from the deck (since dealer did not have blackjack), the deck has 44 cards left. The probability of the hole card being 2,3,6,7,8 is 4/44, the probability of the hole card being 4 or 5 or 9 is 3/44, and the probability of the hole card being 10 is 15/44. These probabilities total 1.

If the hole card is 7,8,9, or 10, then the dealer is done. If the hole card is 2,3,4,5,6, then the dealer needs to draw another card, which can be ace. Put all the aces back in the deck (now 47 cards) and draw a card.

Do a similar thing with dealer up card ace. Check the hole card, if it's 10, then player loses to a dealer blackjack. Otherwise, put the 10 back in the deck, have the player do his thing, then remove all 10's from the deck and have the dealer select a card as the hole card. If the dealer needs to draw a third card, put all the 10's back in the deck and proceed.

Would playing the game this way produce exactly the same results as the way it's actually done in real life where the hole card just sits there, face down?
link to original post



What do you mean, "when it's time for the dealer to play out his hand"? Are you simulating or calculating exact probabilities?
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
September 19th, 2025 at 8:03:30 PM permalink
Quote: SkinnyTony


What do you mean, "when it's time for the dealer to play out his hand"? Are you simulating or calculating exact probabilities?
link to original post



Exact. When the dealer needs another card (or the player), I need to know the probability of getting any of those ranks, which is why I'm struggling with what is in the denominator (48 or 49?). I go through all possible cards the dealer or the player could get, and I can calculate the expected value as the sum of (probability of getting that card times win amount). If multiple cards are needed, it's the same thing, just more entries in the sum (e.g. dealer 10+4+2+A=17, so I need the probability of getting a 4 then a 2 then ace). The sum of the probabilities of getting any card or cards must equal 1.
unJon
unJon
  • Threads: 17
  • Posts: 5022
Joined: Jul 1, 2018
September 19th, 2025 at 8:16:11 PM permalink
Quote: KevinAA

Quote: SkinnyTony


What do you mean, "when it's time for the dealer to play out his hand"? Are you simulating or calculating exact probabilities?
link to original post



Exact. When the dealer needs another card (or the player), I need to know the probability of getting any of those ranks, which is why I'm struggling with what is in the denominator (48 or 49?). I go through all possible cards the dealer or the player could get, and I can calculate the expected value as the sum of (probability of getting that card times win amount). If multiple cards are needed, it's the same thing, just more entries in the sum (e.g. dealer 10+4+2+A=17, so I need the probability of getting a 4 then a 2 then ace). The sum of the probabilities of getting any card or cards must equal 1.
link to original post



In theory you have to play out the hand 49 different times ant each decision point, assuming each time the dealer downcard is one of the 49 different possible options. And then average the result to test the EV of the various decisions.
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
September 19th, 2025 at 9:53:22 PM permalink
With a 10 up, there are 45 different possible options. 4 of them (all 4 aces, assuming the player did not receive any aces) are not possible if the dealer doesn't have blackjack.

The problem is that if I use 49 as the denominator, the sum of the probabilities of getting a card do not total 1. And then if the dealer needs a third card, now aces are possible.
gordonm888
Administrator
gordonm888
  • Threads: 64
  • Posts: 5739
Joined: Feb 18, 2015
September 20th, 2025 at 2:08:17 AM permalink
Quite a few years ago, I did exactly what you are doing. Except, I made the calculations dependent on the defined composition of the shoe rather than assumed it was a fresh single deck, which is what you seem to be assuming. But, whatever.

Anyway, I do understand exactly what you are asking about.

The order of calculations (for dealer upcard 2-9) for every possible player hand is to
- first calculate the probability of the three initial cards,
- then to calculate the probability of the cards being drawn by the player given the removal of the first three cards from the deck
- then calculate the probability of the cards being drawn by the dealer given the removal of all the players cards and the dealer's upcard from the deck for dealer totals of 17, 18, 19 ,20, 21, 22+(Bust) and Blackjack
- define all the outcomes in terms of win, lose or tie

Of, course, for the "vs dealer Ten" calculations the dealer peeks. there are two ways to handle this.

1. Segment the definition of the initial dealer hand into 10 dealer hands: T-A, T-2, T-3, T-4,....T-T. This is easy to understand but greatly increases the number of hands for which you have to calculate probabilities and define outcomes for.

2.The simpler way is to segment the hands into two post-peek scenarios, namely "vs dealer Ten that is blackjack, Ten-Ace" and "vs dealer Ten plus a non-ace".

a) When dealer has blackjack, divide the scenario into when player also has blackjack (and dealer and player tie) and when the player has anything else. You don't need to define the cards that player may draw, because dealer's blackjack always wins.
b) In the non-ace dealer facedown card (dealer peeked and it's not a blackjack) and when player is not drawing to their first two cards: define the dealers hole card as being drawn from 45 cards and any subsequent cards as being drawn (to dealer's hand) from 48 cards, then 47 cards, etc. The probabilities will sum to 1.0 if you include the "vs dealer Ten that is blackjack, Ten-Ace" scenario in which the dealer's up card is drawn from 49 cards.

c) When a player draws n cards to their 2-card hand, you fearlessly define the probabilities such that
- the player's n drawn cards are being drawn from a 49 card deck
- then define a reduced deck with all the players cards and the dealer's face -up card removed from the deck
- for probability calculation purposes, define the first card "drawn" to the dealer's hand as coming from that reduced deck with the further removal of all the remaining aces. this corresponds to the hole card that is known to not be an ace.
- then for probability calculation purposes all further cards drawn to the dealers hand are defined to be drawn from a deck with all the remaining aces in it but with the dealers' first two cards removed and with all the players cards removed.

When calculating the total probability of the "player and dealers hand", Method (1) and (2) will produce the same probability value.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
unJon
unJon
  • Threads: 17
  • Posts: 5022
Joined: Jul 1, 2018
September 20th, 2025 at 2:51:59 AM permalink
Quote: KevinAA

With a 10 up, there are 45 different possible options. 4 of them (all 4 aces, assuming the player did not receive any aces) are not possible if the dealer doesn't have blackjack.

The problem is that if I use 49 as the denominator, the sum of the probabilities of getting a card do not total 1. And then if the dealer needs a third card, now aces are possible.
link to original post



If doing exact, then just use 45 ways for the player first decision, 44 for second decision, etc. and then 49 minus player hit cards for dealer decision. And you average all of those.
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 20th, 2025 at 5:48:15 AM permalink
Why not use an easy hand, T,T v T, to better describe the procedure? The dealer has peeked and confirmed that her hole card is not an Ace. Therefore, three cards are fully revealed, and one card is partially revealed. We consider this situation when there are still two cards of each rank that are not fully revealed.

On Wizard calculator, these are the EV numbers:

Stand: 0.555171;
Hit: -0.843115.

We do not allow pair splitting for now.
Last edited by: aceside on Sep 20, 2025
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
September 20th, 2025 at 4:44:19 PM permalink
Quote: gordonm888

Quite a few years ago, I did exactly what you are doing. Except, I made the calculations dependent on the defined composition of the shoe rather than assumed it was a fresh single deck, which is what you seem to be assuming. But, whatever.

Anyway, I do understand exactly what you are asking about.

The order of calculations (for dealer upcard 2-9) for every possible player hand is to
- first calculate the probability of the three initial cards,
- then to calculate the probability of the cards being drawn by the player given the removal of the first three cards from the deck
- then calculate the probability of the cards being drawn by the dealer given the removal of all the players cards and the dealer's upcard from the deck for dealer totals of 17, 18, 19 ,20, 21, 22+(Bust) and Blackjack
- define all the outcomes in terms of win, lose or tie

Of, course, for the "vs dealer Ten" calculations the dealer peeks. there are two ways to handle this.

1. Segment the definition of the initial dealer hand into 10 dealer hands: T-A, T-2, T-3, T-4,....T-T. This is easy to understand but greatly increases the number of hands for which you have to calculate probabilities and define outcomes for.

2.The simpler way is to segment the hands into two post-peek scenarios, namely "vs dealer Ten that is blackjack, Ten-Ace" and "vs dealer Ten plus a non-ace".

a) When dealer has blackjack, divide the scenario into when player also has blackjack (and dealer and player tie) and when the player has anything else. You don't need to define the cards that player may draw, because dealer's blackjack always wins.
b) In the non-ace dealer facedown card (dealer peeked and it's not a blackjack) and when player is not drawing to their first two cards: define the dealers hole card as being drawn from 45 cards and any subsequent cards as being drawn (to dealer's hand) from 48 cards, then 47 cards, etc. The probabilities will sum to 1.0 if you include the "vs dealer Ten that is blackjack, Ten-Ace" scenario in which the dealer's up card is drawn from 49 cards.

c) When a player draws n cards to their 2-card hand, you fearlessly define the probabilities such that
- the player's n drawn cards are being drawn from a 49 card deck
- then define a reduced deck with all the players cards and the dealer's face -up card removed from the deck
- for probability calculation purposes, define the first card "drawn" to the dealer's hand as coming from that reduced deck with the further removal of all the remaining aces. this corresponds to the hole card that is known to not be an ace.
- then for probability calculation purposes all further cards drawn to the dealers hand are defined to be drawn from a deck with all the remaining aces in it but with the dealers' first two cards removed and with all the players cards removed.

When calculating the total probability of the "player and dealers hand", Method (1) and (2) will produce the same probability value.
link to original post



Awesome! Thank you.

I'm creating arrays for the number of cards in each rank so that it's not fixed that the calculation has to be the first hand of the deck. It will be initialized that each rank has 4 cards, and 16 tens.
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
September 20th, 2025 at 4:56:16 PM permalink
Quote: aceside

Why not use an easy hand, T,T v T, to better describe the procedure? The dealer has peeked and confirmed that her hole card is not an Ace. Therefore, three cards are fully revealed, and one card is partially revealed. We consider this situation when there are still two cards of each rank that are not fully revealed.

On Wizard calculator, these are the EV numbers:

Stand: 0.555171;
Hit: -0.843115.

We do not allow pair splitting for now.
link to original post



For that hand, the procedure I'm going with is:

the dealer's hole card can be ace with probability 4/49 (player loses)
hole card can be 2 with probability 4/45
3 and 4/45
4 and 4/45
5 and 4/45
6 and 4/45
7 and 4/45
8 and 4/45
9 and 4/45
hole card 10 with probability 13/45

8*4/45+13/45=45/45, so that is complete

If the dealer needs a third card, put the aces back in the deck and have the dealer draw from one of 48 cards.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 20th, 2025 at 5:12:33 PM permalink
You complicated yourself. The dealer has confirmed that her hole card is not an Ace; therefore, her hole card can only be a
2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, or K, each with a probability of 1/12 in my example.

If it is a 2, 3, 4, 5, or 6, she must take a third card from a depleted deck.

It’s not hard to find the Stand EV.
SkinnyTony
SkinnyTony
  • Threads: 4
  • Posts: 179
Joined: Jul 22, 2025
September 20th, 2025 at 9:57:00 PM permalink
Quote: aceside

You complicated yourself. The dealer has confirmed that her hole card is not an Ace; therefore, her hole card can only be a
2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, or K, each with a probability of 1/12 in my example.

If it is a 2, 3, 4, 5, or 6, she must take a third card from a depleted deck.

It’s not hard to find the Stand EV.
link to original post



It's not 1/12 each because the player has 2 cards as well. You know these cards when you make your decision so you have to take them into account when calculating your strategy (the dealer's likelihood of making each possible hand changes)
Last edited by: SkinnyTony on Sep 20, 2025
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 21st, 2025 at 3:37:55 AM permalink
I was talking about the particular example I presented above. Apparently, there is a before/after dealing confusion here. I’m traveling. Once home, I will calculate out these EV numbers.
gordonm888
Administrator
gordonm888
  • Threads: 64
  • Posts: 5739
Joined: Feb 18, 2015
September 21st, 2025 at 5:26:56 AM permalink
The same issues apply when dealer has an Ace and peeks, indicating they don't have a Ten.

The people providing simplistic solutions in which both dealer or player have only two 2 or 3 cards (such as starting with T,T vs T) should understand that Blackjack analysis involves calculating the EV for

2,2 vs A
T,2 vs T

T,2 vs T cannot be accurately calculated without including

T,2,A,2,A,3 vs T,2,2,A,A,4

and other similar multicard hands. Any analysis of a dealer Ten should include T2AAAA+ (A,2,3,....T)

Analysis of 2,2 vs A is much harder than analyzing T,T vs T because there are so many lengthy multicard hands.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 24th, 2025 at 11:16:54 AM permalink
Quote: gordonm888



T,2 vs T cannot be accurately calculated without including

T,2,A,2,A,3 vs T,2,2,A,A,4

and other similar multicard hands. Any analysis of a dealer Ten should include T2AAAA+ (A,2,3,....T)
link to original post


Hi Gordon, I've read your post a few times but still haven't understood this part. I'm using this hand, T,T v T, as an example to calculate the Stand EV and Hit EV numbers.

Stand: 0.555171;
Hit: -0.843115.

In this example, I fix the remaining deck to be 26 cards (2 cards each rank) after dealer peeking. Do you think if I can get exact EV numbers in this particular example?
SkinnyTony
SkinnyTony
  • Threads: 4
  • Posts: 179
Joined: Jul 22, 2025
September 24th, 2025 at 1:23:51 PM permalink
Quote: aceside

Quote: gordonm888



T,2 vs T cannot be accurately calculated without including

T,2,A,2,A,3 vs T,2,2,A,A,4

and other similar multicard hands. Any analysis of a dealer Ten should include T2AAAA+ (A,2,3,....T)
link to original post


Hi Gordon, I've read your post a few times but still haven't understood this part. I'm using this hand, T,T v T, as an example to calculate the Stand EV and Hit EV numbers.

Stand: 0.555171;
Hit: -0.843115.

In this example, I fix the remaining deck to be 26 cards (2 cards each rank) after dealer peeking. Do you think if I can get exact EV numbers in this particular example?
link to original post



This is a degenerate case because you can only ever hit 20 once. There's a branching factor every time you take a card and have the option to hit or stand again.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 24th, 2025 at 1:45:24 PM permalink
I actually reproduced these two EV numbers but still am not sure if they are exact or not, because the above numbers have only several digits behind the decimal point. This is a lot more complicated than I thought.
gordonm888
Administrator
gordonm888
  • Threads: 64
  • Posts: 5739
Joined: Feb 18, 2015
September 24th, 2025 at 4:52:07 PM permalink
Quote: aceside

Quote: gordonm888



T,2 vs T cannot be accurately calculated without including

T,2,A,2,A,3 vs T,2,2,A,A,4

and other similar multicard hands. Any analysis of a dealer Ten should include T2AAAA+ (A,2,3,....T)
link to original post


Hi Gordon, I've read your post a few times but still haven't understood this part. I'm using this hand, T,T v T, as an example to calculate the Stand EV and Hit EV numbers.

Stand: 0.555171;
Hit: -0.843115.

In this example, I fix the remaining deck to be 26 cards (2 cards each rank) after dealer peeking. Do you think if I can get exact EV numbers in this particular example?
link to original post



Yes, I'm just claiming that you've picked an easy example. Because player stands on T,T or just hits it once
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 25th, 2025 at 5:50:36 AM permalink
Earlier, there was a post discussing pair splitting EV numbers. I still hope you guys can put some thoughts on this hand: T, T vs 6 in a six-deck shoe game. It’s out of my range of skills. Are the splitting EV results exact?
gordonm888
Administrator
gordonm888
  • Threads: 64
  • Posts: 5739
Joined: Feb 18, 2015
September 25th, 2025 at 3:08:26 PM permalink
Quote: aceside

Earlier, there was a post discussing pair splitting EV numbers. I still hope you guys can put some thoughts on this hand: T, T vs 6 in a six-deck shoe game. It’s out of my range of skills. Are the splitting EV results exact?
link to original post



What I heard was NO, they are not exact. The WOO calculator and the bjstrat calculator agree with each other. Wizard posted on this thread that his WOO calculator does not factor in the cards drawn to the 1st split hand when calculating the probabilities for the 2nd (or nth) split hands. This is sometime called the "recurrence approximation."
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
September 25th, 2025 at 6:24:53 PM permalink
Quote: aceside

Quote: gordonm888



T,2 vs T cannot be accurately calculated without including

T,2,A,2,A,3 vs T,2,2,A,A,4

and other similar multicard hands. Any analysis of a dealer Ten should include T2AAAA+ (A,2,3,....T)
link to original post


Hi Gordon, I've read your post a few times but still haven't understood this part. I'm using this hand, T,T v T, as an example to calculate the Stand EV and Hit EV numbers.

Stand: 0.555171;
Hit: -0.843115.

In this example, I fix the remaining deck to be 26 cards (2 cards each rank) after dealer peeking. Do you think if I can get exact EV numbers in this particular example?
link to original post



How did you arrive at that number?

For T,T vs T, I'm getting stand EV = 0.583153676761448.

This matches the Wizard's blackjack hand calculator value of 0.583154.

I'm doing single deck, first hand of the deck.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 25th, 2025 at 6:56:51 PM permalink
I used one half deck of 26 cards after dealing of the T,T v T hand to do this calculation.
SkinnyTony
SkinnyTony
  • Threads: 4
  • Posts: 179
Joined: Jul 22, 2025
September 25th, 2025 at 7:06:41 PM permalink
Quote: aceside

I used one half deck of 26 cards after dealing of the T,T v T hand to do this calculation.
link to original post



Why? Are you specifically trying to solve for that situation? Or is it supposed to be a shortcut for something else?
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 25th, 2025 at 7:15:36 PM permalink
With fewer cards, the calculation is much simpler, because those hands that are composed of multiple Aces and Deuces will be eliminated. I was planning to calculate these EV numbers by hand, but eventually used my laptop to do this job.
SkinnyTony
SkinnyTony
  • Threads: 4
  • Posts: 179
Joined: Jul 22, 2025
September 25th, 2025 at 8:03:19 PM permalink
Quote: aceside

With fewer cards, the calculation is much simpler, because those hands that are composed of multiple Aces and Deuces will be eliminated. I was planning to calculate these EV numbers by hand, but eventually used my laptop to do this job.
link to original post



It's definitely simpler but it's also not going to be accurate
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
September 25th, 2025 at 9:49:17 PM permalink
I didn't check all hands, but I checked enough to be confident that I can match the Wizard's calculation for stand EV.

I just finished double down (easier than hit, since it's just one card), and I was not able to match the Wizard's calculation for double down EV if the dealer up card is ten or ace.

For example, suppose the player gets a 2 and a 9 and the dealer has an ace. What I did was have a loop for the double down card from 1 to 10 (1 represents ace), hit the 11 with that double down card, play out the dealer's hand, and calculate the contribution to the expected win of 2 (if player wins) or -2 (if player loses) using the probability of getting that double down card times the probability of the dealer getting whatever total (17 to 21 or bust). For example, the probability of the double down card being a 2 is 3/49 since there are three 2's left out of 49 cards (the original 52 card deck minus the player's 2 and 9 and the dealer's ace).

When playing out the dealer's hand, for the hole card, I have a loop from 1 to 9 (skipping 10 since that would be dealer blackjack), and the probability of the hole card being n is the number of cards of rank n divided by 32. After the player's first two cards and the dealer up card and the player's double down card, there are 32 cards left that are not 10. Should the dealer need another card, the denominator changes to 47 since all 16 tens are now available.

This method works with stand but it does not work with double down, which I find odd. For player 2+9 vs ace, I got a double down EV of 0.165306. The Wizard says it should be 0.181921.

I changed the program to loop through all 9 possible hole cards first, then loop through all 10 possible double down cards, and I was able to match this EV at 0.181921355466029.

If there is a way to have the dealer draw a hole card after the player chooses cards, that would make hit and split easier. But if it has to be this way, I guess I'll continue. I'm perplexed as to why it matters and why it doesn't give me the wrong answer for stand EV.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 26th, 2025 at 5:11:45 AM permalink
Quote: SkinnyTony

Quote: aceside

With fewer cards, the calculation is much simpler, because those hands that are composed of multiple Aces and Deuces will be eliminated. I was planning to calculate these EV numbers by hand, but eventually used my laptop to do this job.
link to original post



It's definitely simpler but it's also not going to be accurate
link to original post


My method is simpler but my results are accurate, because I’m able to express my EV numbers in fractions, instead of decimals.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 26th, 2025 at 5:57:21 AM permalink
Quote: KevinAA

I changed the program to loop through all 9 possible hole cards first, then loop through all 10 possible double down cards, and I was able to match this EV at 0.181921355466029.
link to original post


I still haven’t understood this paragraph. It seems like you were saying, if you used the wrong method to calculate, you would get a Double EV that matches the Wizard number. If you used the correct method to calculate, you would get something that mismatches Wizard. This makes me think that Wizard’s numbers might be wrong. Could you please explain a little more into details of this part?

I’m glad you are doing this. When I did my calculation with T,T v T, I dealt one card out of {A,2,3 … and T} to player first, and then used the depleted deck to find all possible hands of dealer. I could calculate these Hit EV numbers correctly.
Last edited by: aceside on Sep 26, 2025
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
September 26th, 2025 at 8:41:34 AM permalink
Quote: aceside

Quote: KevinAA

I changed the program to loop through all 9 possible hole cards first, then loop through all 10 possible double down cards, and I was able to match this EV at 0.181921355466029.
link to original post


I still haven’t understood this paragraph. It seems like you were saying, if you used the wrong method to calculate, you would get a Double EV that matches the Wizard number. If you used the correct method to calculate, you would get something that mismatches Wizard. This makes me think that Wizard’s numbers might be wrong. Could you please explain a little more into details of this part?

I’m glad you are doing this. When I did my calculation with T,T v T, I dealt one card out of {A,2,3 … and T} to player first, and then used the depleted deck to find all possible hands of dealer. I could calculate these Hit EV numbers correctly.
link to original post



I'm not claiming one method is right or wrong. They are different.

Giving the player a double down card first, and then having the dealer draw a hole card (not a 10), and more cards if necessary, gives me 0.1653.

But if I have the dealer draw a hole card first (not a 10), then give the player a double down card, and then have the dealer draw more cards if necessary (if hole card is 2-6), I get 0.1819.

So, if the Wizard's calculation is correct, then it means that giving the player the double down card first is wrong. It just seems strange that it would matter. Or I'm calculating it incorrectly using player goes next method.

I know it doesn't matter whether the opening hand goes player->dealer->player or player->player->dealer. It also doesn't matter if the dealer up card is 2-9. It's only when the dealer up card is ace or 10 that the two methods (who gets the next card, player or hole card to the dealer) diverge.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 26th, 2025 at 8:47:16 AM permalink
I haven’t tried this calculation myself, but based on your description I believe the resulting EV numbers must be the same regardless of which method to use.

To check on this part, can you please do the calculation using your method on the hand T, T v T? To simplify the process, we use one half deck of 26 cards after dealing of this hand. I know

Hit: -0.843115.
Last edited by: aceside on Sep 26, 2025
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
September 26th, 2025 at 9:48:38 AM permalink
Quote: aceside

I haven’t tried this calculation myself, but based on your description I believe the resulting EV numbers must be the same regardless of which method to use.

To check on this part, can you please do the calculation using your method on the hand T, T v T? To simplify the process, we use one half deck of 26 cards after dealing of this hand. I know

Hit: -0.843115.
link to original post



My program is set to deal from a full deck using basic strategy, and while I am planning to make it more flexible, it isn't right now. It only calculates stand T,T vs T.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
September 28th, 2025 at 4:02:38 AM permalink
Hi, I find bjstrat.net has done all these calculations. Programs are also available to download there. Please take a look if you need.
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
Thanked by
aceside
October 8th, 2025 at 8:14:10 PM permalink
I've got the basic strategy calculations done, but I don't match the Wizard. My calculation of house edge for the first hand is 0.48028%. WOO says it is 0.48383%.

The rules I am using are:
single deck
dealer hits soft 17
double down on hard 10-11, no double after split
split any pair only once
split aces get one card, no surrender, dealer peeks for BJ

I got the perfect strategy calculation from WOO for all 550 starting hands (there are another 110 possible hands where the dealer has BJ; those are easy).

Many of them match my basic strategy calculations, including all the double downs and the split aces.

I know there can be a difference between basic and perfect strategy. However, this is puzzling... if I sum the probability of a starting hand times WOO perfect strategy, I get 0.44493%. This number is not the same as 0.44513%, the WOO optimal house edge on his house edge calc page for these rules.

Finally, is there a standard for "dealer hits soft 17"? My program will have the dealer hit A+2+4, but I have played a real game where dealer A+2+4 would then be stand on a dealer three card total of 17.

Thanks!
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
October 9th, 2025 at 3:26:24 AM permalink
Great! I’d like to dig. Have you used the programs from bjstrat.net? Or, you programed them yourself?

There are two blackjack rules, Stand-17 and Hit-17. In a Stand-17 game, dealer must stand A+2+4; in Hit-17, dealer must hit A+2+4.
Last edited by: aceside on Oct 9, 2025
KevinAA
KevinAA
  • Threads: 20
  • Posts: 405
Joined: Jul 6, 2017
October 9th, 2025 at 7:23:34 AM permalink
Quote: aceside

Great! I’d like to dig. Have you used the programs from bjstrat.net? Or, you programed them yourself?

There are two blackjack rules, Stand-17 and Hit-17. In a Stand-17 game, dealer must stand A+2+4; in Hit-17, dealer must hit A+2+4.
link to original post



I wrote the program myself.
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
October 9th, 2025 at 1:07:26 PM permalink
Quote: KevinAA

I've got the basic strategy calculations done, but I don't match the Wizard. My calculation of house edge for the first hand is 0.48028%. WOO says it is 0.48383%.
link to original post


Where do you find this WOO number?

On bjstrat, there are two sets of EV numbers:

Basic Strategy: Total EV=-0.4451%; 8,8v2 SPL1 EV=0.01099%.
Best Strategy: Total EV=-0.4448%; 8,8v2 SPL1 EV=0.01210%.
Last edited by: aceside on Oct 9, 2025
aceside
aceside
  • Threads: 2
  • Posts: 781
Joined: May 14, 2021
October 10th, 2025 at 5:28:17 AM permalink
I need to revise some of the above numbers. On bjstrat.net, there are two sets of EV numbers:

Basic Strategy: Total EV=-0.004451; 8,8v2 SPL1 EV=0.01099.
Best Strategy: Total EV=-0.004448; 8,8v2 SPL1 EV=0.01210.

On Wizard blackjack calculator,

8,8v2 SPL1 EV=0.012103.

The 8v2 Hit EV=0.006051 after dealing this hand of 8,8v2, so the SPL1 EV=2x0.006051=0.012102. This calculation assumes that two split hands contribute equally to the total EV. Is this correct?
Last edited by: aceside on Oct 10, 2025
DRich
DRich
  • Threads: 91
  • Posts: 14074
Joined: Jul 6, 2012
October 10th, 2025 at 6:35:42 PM permalink
Quote: unJon

Quote: KevinAA

Quote: SkinnyTony


What do you mean, "when it's time for the dealer to play out his hand"? Are you simulating or calculating exact probabilities?
link to original post



Exact. When the dealer needs another card (or the player), I need to know the probability of getting any of those ranks, which is why I'm struggling with what is in the denominator (48 or 49?). I go through all possible cards the dealer or the player could get, and I can calculate the expected value as the sum of (probability of getting that card times win amount). If multiple cards are needed, it's the same thing, just more entries in the sum (e.g. dealer 10+4+2+A=17, so I need the probability of getting a 4 then a 2 then ace). The sum of the probabilities of getting any card or cards must equal 1.
link to original post



In theory you have to play out the hand 49 different times ant each decision point, assuming each time the dealer downcard is one of the 49 different possible options. And then average the result to test the EV of the various decisions.
link to original post



I agree, play it out for every possible hole card and take the average.
You can't know everything, but you can know anything.
  • Jump to: