Expected Value of Splitting

#1
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.
 

KenSmith

Administrator
Staff member
#2
My reply won't be very satisfying, because I'm sidestepping your actual question since I don't have a chance at the moment to look at Farmer's code.

I can certainly relate though to the headaches involved in pair splitting computations. Regrettably I think the most elaborate discussions of these issues were lost when the BJMath.com forums disappeared, where Cacarulo, MGP, and Steve Jacobs went over this intently, and for many months.

In its decidedly inadequate stead, I can offer this link from my bookmarks:
http://wizardofodds.com/askthewizard/blackjack.html
Midpage he talks about his process.

I'm almost afraid to revisit this area of understanding, because it has the ability to consume many hours of effort. My own CA code never implemented the very best approaches, and I've always suffered along with very-nearly-precise answers as a result. On the other hand, there were a few situations that I brute-force solved exactly for the research discussed in the aforementioned BJMath threads. That was my contribution to the effort.
 
#3
LMendy said:
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)
I have not been involved with blackjack analysis in quite a long time, but I stumbled across several interesting threads here. It is really too bad that bjmath.com is dead, since there was a lot of useful discussion there. I actually archived big chunks of it, some of which might be relevant here.

Anyway, the latest version of my software was 5.2, and it is now hosted in a few different places, including my rather spare site:

https://sites.google.com/site/erfarmer/downloads

LMendy said:
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.
Splitting is not only the most difficult to calculate, it is the most difficult to even describe precisely *what* you mean to calculate, since there are so many different reasonable ways to specify playing strategy.

Very briefly, my algorithm only provides exact values when no resplits are allowed; when replits are allowed, the algorithm is only an approximation, and there are better approximations out there. And even without resplits, we have to be careful for what strategy we are computing exact values. Colin describes the issue (and an alternative version of the code that I posted a long time ago) very well in this thread:

http://www.blackjackinfo.com/bb/showthread.php?p=216627#post216627

Hope this helps,
Eric
 

London Colin

Well-Known Member
#4
Hey Eric! Good to hear from you again.
ericfarmer said:
I have not been involved with blackjack analysis in quite a long time, but I stumbled across several interesting threads here. It is really too bad that bjmath.com is dead, since there was a lot of useful discussion there. I actually archived big chunks of it, some of which might be relevant here.
It was pointed out in another thread that you can still access some of the forum posts via google. It seems like whatever forum server software was involved is not running but you can still access some of the pages statically. It's not ideal but it's better than nothing.


ericfarmer said:
Anyway, the latest version of my software was 5.2, and it is now hosted in a few different places, including my rather spare site:

https://sites.google.com/site/erfarmer/downloads



Splitting is not only the most difficult to calculate, it is the most difficult to even describe precisely *what* you mean to calculate, since there are so many different reasonable ways to specify playing strategy.

Very briefly, my algorithm only provides exact values when no resplits are allowed; when replits are allowed, the algorithm is only an approximation, and there are better approximations out there. And even without resplits, we have to be careful for what strategy we are computing exact values. Colin describes the issue (and an alternative version of the code that I posted a long time ago) very well in this thread:

http://www.blackjackinfo.com/bb/showthread.php?p=216627#post216627

Hope this helps,
Eric
LMendy, you shold note that the version of Eric's code that I posted in the above thread was wrong (because I cut it from my own copy which features some amendments). You can find a link to the original at bjmath.com in this thread - [thread]22385[/thread], as well as other potentially interesting stuff.
 
Top