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?
Quote: KevinAAJust 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?
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.
Quote: KevinAAQuote: 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 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.
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.
Quote: KevinAAWith 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.
On Wizard calculator, these are the EV numbers:
Stand: 0.555171;
Hit: -0.843115.
We do not allow pair splitting for now.