Hi Everyone -
I attempted to write a program in C++ to calculate the expected value of hitting, standing, doubling down, and splitting various BlackJack hands against a dealer's up card. I had trouble performing the calculation for splitting, and instead found Eric Farmer's open source program at:
http://www.bjmath.com/bjcomputer/computer/gamegen.htm (Archive copy)
After analyzing his source code, I believe he does not correctly calculate the expected value of splitting. Does anyone who is familiar with the source code agree with my critique (see below)? If you are not familiar with the source code, how would you go about calculating the expected value of splitting? This seems like the most difficult calculation of them all. Thanks in advance for your help.
----------------
Here is my critique:
In the calculation of valueSplit on lines 1100 - 1101 of Blackjack.cpp, he multiplies by the number of splitHands. Presumably this is because any of the hands being played as a result of the split could end up equal to the variable PlayerHand hand, with equal probability. So he multiplies by the number of splitHands to account for this (the combinatorics formula "splitHands Choose 1" = (splitHands!)/(1! * (splitHands - 1)!) = splitHands).
However, it is possible for all of the splitHands to end up equivalent to the variable PlayerHand hand (or 2 out of 3, or 2 out of 4, or 3 out of 4, etc.)! It appears that this is not accounted for in the calculation. But it gets even more complicated due to the effect of the removal of cards from the shoe as one plays the simultaneously active hands. For example, imagine a game of BlackJack with one deck, and the dealer's upCard is a 5, and the player has a pair of 8's. Player splits the 8's and receives more 8's, and splits those hands until he has 4 simultaneous splitHands, each with a single 8. He receives a 5 on Hand 1 and stays. He receives a 5 on Hand 2 and stays. He receives a 5 on Hand 3 and stays. But now the deck is exhausted of 5's and it is impossible for the player to receive a 5 on his play of Hand 4! I believe this should also be considered when calculating the overall valueSplit.
I attempted to write a program in C++ to calculate the expected value of hitting, standing, doubling down, and splitting various BlackJack hands against a dealer's up card. I had trouble performing the calculation for splitting, and instead found Eric Farmer's open source program at:
http://www.bjmath.com/bjcomputer/computer/gamegen.htm (Archive copy)
After analyzing his source code, I believe he does not correctly calculate the expected value of splitting. Does anyone who is familiar with the source code agree with my critique (see below)? If you are not familiar with the source code, how would you go about calculating the expected value of splitting? This seems like the most difficult calculation of them all. Thanks in advance for your help.
----------------
Here is my critique:
In the calculation of valueSplit on lines 1100 - 1101 of Blackjack.cpp, he multiplies by the number of splitHands. Presumably this is because any of the hands being played as a result of the split could end up equal to the variable PlayerHand hand, with equal probability. So he multiplies by the number of splitHands to account for this (the combinatorics formula "splitHands Choose 1" = (splitHands!)/(1! * (splitHands - 1)!) = splitHands).
However, it is possible for all of the splitHands to end up equivalent to the variable PlayerHand hand (or 2 out of 3, or 2 out of 4, or 3 out of 4, etc.)! It appears that this is not accounted for in the calculation. But it gets even more complicated due to the effect of the removal of cards from the shoe as one plays the simultaneously active hands. For example, imagine a game of BlackJack with one deck, and the dealer's upCard is a 5, and the player has a pair of 8's. Player splits the 8's and receives more 8's, and splits those hands until he has 4 simultaneous splitHands, each with a single 8. He receives a 5 on Hand 1 and stays. He receives a 5 on Hand 2 and stays. He receives a 5 on Hand 3 and stays. But now the deck is exhausted of 5's and it is impossible for the player to receive a 5 on his play of Hand 4! I believe this should also be considered when calculating the overall valueSplit.