Eric Farmer code: wrong split EV estimates ?

MangoJ

Well-Known Member
#1
Hi,

Is there somebody using Eric Farmers C++ blackjack lib ?
I'm currently working with his code, as I'm writing a program with the aim of faster calculations. My code is independent from Eric's version, I just use it to verify results.

The most difficult part is calculating split EVs, due to the complexity of the problem. I use a quite simple approximation which is reasonable fast, and over the majority of split hands .vs upcards, Eric's EVs and my EVs are identical (with difference of 10^-8) Since I'm using single precision floating point operations, this error is well expected.

But some split hands have a far higher deviation (most are about 10^-6, but a few are up to 10^-3). The highest difference between both codes was split 2-2 vs. 6 on SD S17, D9-11, DAS (no resplit).

I'm not sure how Eric's code works (I suck at reading codes). My approximation is, calculating the EV of a single card 2 vs. 6 (with another 2 missing from the deck), and estimate that this will be the EV for both hands.
Erics code give a EV of 25.87%, while the approximation gives a 26.56%.

In order to at least test which value is off, I did a simulation of 500.000 splits, and the first hand got an EV of 26.53% +/- 0.37% (actually half of that). The second hand played afterwards gets an EV of 27.60% +/- 0.37%. The second hand EV is higher, as more cards are already known.

My question is: The approximation of single hand 2 vs. 6 gives an accurate estimate (26.56%) of first hand (26.53% +/- 0.37% by simulation), while second hand must perform better, and hence real split EV should be > 26.5% (27.06% +/ 0.33% in simulation).

Why does Eric's code estimate so low (as 25.87%), while other split configurations are much more precise (10^-8 with single-hand method)?
How does Eric estimate splits, and why is it off from simulation such large (where a simple approximation performes better) ?
 

London Colin

Well-Known Member
#2
We've discussed this before -

[post]216627[/post]

Using the NEW_SPLIT code I posted, Eric's lib gives the answer 26.5593800% for your 2,2 vs 6 example.
 

MangoJ

Well-Known Member
#3
Many thanks, LC - again. I must admit I feel silly now, as we did discuss this a few month ago. But honestly I couldn't fully follow your post back then.
After I read an exact split paper a few weeks ago, it raised my interested again, trying a new approach.

It surely must look quite autistic, doing the same stuff over again, stubling over the same problems, raising the same questions. Maybe I am, reminds me of "Rainman, are you autistic ?" - "I don't know. No, definetly not."
 

MGP

Well-Known Member
#5
The exact values for splits are given in Don Schlesinger's BJA3. Cacarulo and I were the first to come up with algorithms to give the exact EV's for any number of splits for fixed play and Cacarulo provided them (and a ton of other numbers) for the book. The values were confirmed by brute-force thanks to Ken. Anything else is just an estimate.
 

iCountNTrack

Well-Known Member
#6
MGP said:
The exact values for splits are given in Don Schlesinger's BJA3. Cacarulo and I were the first to come up with algorithms to give the exact EV's for any number of splits for fixed play and Cacarulo provided them (and a ton of other numbers) for the book. The values were confirmed by brute-force thanks to Ken. Anything else is just an estimate.
I have recently finished writing a CA code that calculates split values optimally. The main reason behind this was to have a CA that not only calculates expectations but also variance. While there are many ways/approximations to calculate variance, I caculate the probability of a net outcome of the round so for instance for a game with one split DAS and on a split round, I calculate p_+4 p_+3 .... p_0 .... p_-3 p_-4.

The basis of my CA algorithm is dealing ordered card sequences for dealer and player, find the net outcome based on their respective hand totals, calculate the probability of that dealer/player sequence combination, add it to the variable accumualting the probability of that net outcome.
 

MangoJ

Well-Known Member
#7
Yes, ordered card sequences are the key to performance for calculations of splits. The very finding of a fast address scheme for ordered card sequences led me to a complete rewrite of my CA software.
 

assume_R

Well-Known Member
#8
Can you elucidate on why ordered card sequences are important? Is that so that you don't end up computing both 6, 7, 5, and then 6, 5, 7, whereas they are, in actuality, the same result?

For my CA, I created a hash table for hands already calculated, and 6,7,5 and 6,5,7 were considered to be exactly the same (i.e. hashed to the same value), so I suppose I did have ordered card sequences...

It's when I started adding suits that 6,7,5 and 6,5,7 wouldn't always be exactly the same (if they were different suits, they would have different hash values). Splitting with different suits was a PAIN and takes FOREVER.
 

iCountNTrack

Well-Known Member
#9
assume_R said:
Can you elucidate on why ordered card sequences are important? Is that so that you don't end up computing both 6, 7, 5, and then 6, 5, 7, whereas they are, in actuality, the same result?

For my CA, I created a hash table for hands already calculated, and 6,7,5 and 6,5,7 were considered to be exactly the same (i.e. hashed to the same value), so I suppose I did have ordered card sequences...

It's when I started adding suits that 6,7,5 and 6,5,7 wouldn't always be exactly the same (if they were different suits, they would have different hash values). Splitting with different suits was a PAIN and takes FOREVER.
they give the same result that is true but each is a unique permutation that must be taken into account. so for instance let's say you have a hard 17 (10,7) vs a dealer 6

Player Dealer

10,7 {6,5,7} or {6,7,5}

you get two combinations of player/dealer sequences , {10,7} and {6,5,7}, {10,7} and {6,7,5}. Both combinations result in a player loss. So you calculate the probability of each combination(they are actually the same) based on the deck composition, and add them to the variable accumulating the net outcome of the round which is -1 in this case.
 

MGP

Well-Known Member
#10
iCountNTrack said:
they give the same result that is true but each is a unique permutation that must be taken into account. so for instance let's say you have a hard 17 (10,7) vs a dealer 6

Player Dealer

10,7 {6,5,7} or {6,7,5}

you get two combinations of player/dealer sequences , {10,7} and {6,5,7}, {10,7} and {6,7,5}. Both combinations result in a player loss. So you calculate the probability of each combination(they are actually the same) based on the deck composition, and add them to the variable accumulating the net outcome of the round which is -1 in this case.
I played a bit with estimating split variances but there is no way to get accurate estimates without brute force. It's for the same reason you can't get exact values for busted bets split rules. Some values can be very close but this is one case where there is a big range of errors that depend on the hand/upcard.

The easiest way to deal with ordered play is doing what was outlined in one of the original bj ca papers and that's to go backwards from 21 for each upcard. There is absolutely no need to deal with {6,5,7} / {6,7,5} separately. Eric's CA is a good example of how you can combine them.

All you need for any CA is:

1) A table of dealer probs given a deck composition.

2) A list of possible player hands.

3) Room to store values for stand, hit, double, surrender, split, bonus values for both the shoe state removing that player hand as well as for the split shoe states, and the frequency of each hand as played by the particular strategy for every player hand. Values for different strategies only really need to be kept for the various frequencies, hit and split values. The other values are not strategy dependent.

MGP
 

assume_R

Well-Known Member
#11
My CA works for EV's, but I am now having some trouble with variances. You have to run the CA once to get the EV, and then run it again, but on the second run-through you sum the frequency * (Current_EV - EV)^2? Which essentially requires 2 run-throughs (even though you're saving the results in a hash table from the first one)?
 

MGP

Well-Known Member
#12
Variances for the non-split hands are relatively straightforward and easy to calculate. The frequency doesn't effect the variance for a given hand but does effect the variance for the entrie game.

The real problem is only with splits. The problem with the splits is that the probability of one player hand effects the probability of a second player hand. This is nor relevant for fixed strategy EV's but is very relevant for variances and busted bet splits.

The more annoying thing is that it effects the variances enough that it effects the calculation for the whole game when looking at the weighted average. The best way to get variances is with sims. This of course isn't really that big of a deal since you don't really need the variance for anything unless you're a counter, and for reasons I've explained before, the only logical way to get relevant values for counting is with sims as well. As always, there's an exception. Insurance variances and ev's are easy to calculate exactly.

Here's a useful book chapter:
http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter6.pdf

Start at page 257.
 

MangoJ

Well-Known Member
#13
assume_R said:
My CA works for EV's, but I am now having some trouble with variances. You have to run the CA once to get the EV, and then run it again, but on the second run-through you sum the frequency * (Current_EV - EV)^2? Which essentially requires 2 run-throughs (even though you're saving the results in a hash table from the first one)?
You don't need a 2-run for variance. But you need to average two different quantities (within the same run).
Say X is the payout the player receives (it is -1/0/+1 without doubles and splits). Normally you just average this X over all different drawings to get the EV, so let's say EV = <X>. Where <...> means the average over all drawn cards for a given strategy.

To get the variance, it is VAR = <X²> - <X>², which means you also need to calculate <X²>, so you also average over X². This average can be calculated in the same run when you calculate the average of X.

At the end of all averages, you just plug them in into VAR = <X²> - <X>²
to get the variance.
 

MGP

Well-Known Member
#14
MangoJ said:
You don't need a 2-run for variance. But you need to average two different quantities (within the same run).
Say X is the payout the player receives (it is -1/0/+1 without doubles and splits). Normally you just average this X over all different drawings to get the EV, so let's say EV = <X>. Where <...> means the average over all drawn cards for a given strategy.

To get the variance, it is VAR = <X²> - <X>², which means you also need to calculate <X²>, so you also average over X². This average can be calculated in the same run when you calculate the average of X.

At the end of all averages, you just plug them in into VAR = <X²> - <X>²
to get the variance.
Exactly, the details are in the pages of the book I linked to above. If you want variances, in order to the above information, you need to keep track of not just the ev but also one of win, lose or push.

I do that anyways for bonus rules and chose to keep track of push.

You can get the other values by combining those two since E(win)-E(lose) = EV and p(win) + p(push) + p(lose) = 1 and with the original stand values E(win) = p(win) and E(lose) = p(lose).

As I said though, I question the usefulness of keeping track of variance unless you're looking at insurance plays. You could use it for a risk averse basic strategy but given how far off the splits can be, and that's where it's most relevant, I'm not sure why.
 

assume_R

Well-Known Member
#15
MGP said:
As I said though, I question the usefulness of keeping track of variance unless you're looking at insurance plays. You could use it for a risk averse basic strategy but given how far off the splits can be, and that's where it's most relevant, I'm not sure why.
Well, I partly use my CA's output to generate indices. But right now it only generates EV-maximizing index values, and if I want RA index values, I need to output not only the EV, but also the Var for each play.
 

iCountNTrack

Well-Known Member
#16
MGP said:
I played a bit with estimating split variances but there is no way to get accurate estimates without brute force. It's for the same reason you can't get exact values for busted bets split rules. Some values can be very close but this is one case where there is a big range of errors that depend on the hand/upcard.

The easiest way to deal with ordered play is doing what was outlined in one of the original bj ca papers and that's to go backwards from 21 for each upcard. There is absolutely no need to deal with {6,5,7} / {6,7,5} separately. Eric's CA is a good example of how you can combine them.

All you need for any CA is:

1) A table of dealer probs given a deck composition.

2) A list of possible player hands.

3) Room to store values for stand, hit, double, surrender, split, bonus values for both the shoe state removing that player hand as well as for the split shoe states, and the frequency of each hand as played by the particular strategy for every player hand. Values for different strategies only really need to be kept for the various frequencies, hit and split values. The other values are not strategy dependent.

MGP

As i have mentioned in the other post. The heart of my algorithm is dealing ordered card sequences for both the player and the dealer. It was driven by my desire to have a CA that calculates the EV and Variance.
Dealing ordered card sequences allows us to compute the player's probability for each net win on the round, for instance for a game with one split and DAS, the possible player's outcomes (net wins) on a round are
+4 units, +3 units, +2 units, +1.5 unit, +1 unit, 0, -1 unit, -2 units, -3 units , -4 units.

Once we have the probabilities of each net win. Calculating the EV and the variance is straightforward.
I am sure there are more elegant ways for CA if one is only interested in EV, however i have found that dealing ordered sequences enables to handle split optimally as well be able to calculate the probability of each possible player outcome. After those are computed calculating ev and variance is simple.
 

k_c

Well-Known Member
#17
MGP said:
Variances for the non-split hands are relatively straightforward and easy to calculate. The frequency doesn't effect the variance for a given hand but does effect the variance for the entrie game.

The real problem is only with splits. The problem with the splits is that the probability of one player hand effects the probability of a second player hand. This is nor relevant for fixed strategy EV's but is very relevant for variances and busted bet splits.

The more annoying thing is that it effects the variances enough that it effects the calculation for the whole game when looking at the weighted average. The best way to get variances is with sims. This of course isn't really that big of a deal since you don't really need the variance for anything unless you're a counter, and for reasons I've explained before, the only logical way to get relevant values for counting is with sims as well. As always, there's an exception. Insurance variances and ev's are easy to calculate exactly.

Here's a useful book chapter:
http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter6.pdf

Start at page 257.
I was never too Interested in computing variance and reading about it pretty much gave me a headache. However I've simplfied the calculation of variance for a non-split in blackjack as a function of hand EV and probability of pushing.

stand
variance = 1-prob(stand push) - (stand EV)^2

hit
variance = 1-prob(hit push) - (hit EV)^2

double
variance = 4*(1-prob(double push)) - (double EV)^2

Splitting involves the playing of 2 or more hands simultaneously versus a single dealer hand, which from what I understand means there is covariance. If each of 2 identical hands were played independently versus identical shoe compositions and dealer up cards there would be no covariance, but since they are played together covariance applies.

In another thread I brought up the simple example Of splitting A-A v 9 once for a single deck. It's easy enough to brute force this example by going through all possible 2 card draws.

The correct variance for this example = 2.32262

If there's any hope at computing split variance without using brute force we'd need to utilize data that is simple enough to deal with.

For this example the variance for a single split hand, of which there are 2, computes to about .9022

Dealer probabilities for A-A v 9 are about
prob(17) = 0.1226
prob(18) = 0.1087
prob(19) = 0.3724
prob(20) = 0.0869
prob(21) = 0.0648
prob(bust) = 0.2445

Player probabilities for a single hand are
prob(less than 17) = 18/49
prob(17) = 4/49
prob(18) = 4/49
prob(19) = 4/49
prob(20) = 3/49
prob(21) = 16/49
prob(bust) = 0

Starting with the correct variance and working backwards, we can compute that betting about 1.60449 units on one split hand and 0 units on the other or betting about 1.2872 units on each hand (multiplying by 2) would result in the correct variance. However, the correct answer wouldn't be known in advance in a more complicated case, so some other way of computing these values would be needed.

If there's any hope at all in computing variance without using brute force it seems to me that some sort of covariance between above dealer and player probabilities needs to be utilized. Reading about covariance gives me a big headache so I have no idea if anything is possible or not. (Probably not, which would leave either sim or brute force as the choices.)
 

MangoJ

Well-Known Member
#18
k_c said:
Reading about covariance gives me a big headache so I have no idea if anything is possible or not. (Probably not, which would leave either sim or brute force as the choices.)
There is always the option of estimating covariance of splits for total variance estimation. An estimate of 0.3 for different hands (against same dealer), and 0.6 for split hands (same first card against same dealer) might be good enough, depending on the purpose of variance calculation.

Since no-one plays at exact Kelly bet, (more likely 1/4 or 1/8), small errors in variance have much less impact on RoR.
 

MGP

Well-Known Member
#19
k_c explained what I was pointing out with the book.

If I'm remembering correctly though it should be for the non-doubles Var = p(win)^2 + p(lose)^2 - EV^2 and for doubles it should be 4*(p(win)^2 + p(lose)^2) - EV^2.

He is also right that covariance is the issue but explained it better as I simply referred to it as hand hand interactions. I think if you do the brute force method

ICountNTrack, if you mean brute-force when you say ordered hands then you can do it. If not I don't believe you can get consistently accurate estimates across all different splits using the same method. I looked at this years ago with a bunch of different posssible shortcuts but none were consistent.

We may also have different ideas of what's close. To me it means within 0.001. Here's an example of how close I got for 99 vs 6 S17 DAS, which includes doubling but no hitting:

Code:
6D	EV		Var		Sim 
SPL1	0.439109909	3.508630076	3.50516 
SPL2	0.460532506	4.060268313	4.061357 
SPL3	0.46396665	4.179878702	4.182882 
 
1D	EV		Var		Sim 
SPL1	0.41326826	3.527474935	3.50397 
SPL2	0.423805698	3.848541139	3.825846 
SPL3	0.424280222	3.874085366	3.848289
When I was really close with 1D, I was using a method that was a lot farther off for multi-deck but came to what I call close:

Code:
1D	EV		MGP Var		Sim Var 
SPL1	0.413268260	3.505 631	3.503 97 
SPL2	0.423805698	3.825 914	3.825 846 
SPL3	0.424280222	3.848 506	3.848 289
Unfortunately my spreadhseet for var calcs seems to be corrupted for the latest version of Excel since it's from 2003. The first method did require multiple passes: i.e. SPL1 requires a single pass, SPL2 requires 2 passes and SPL3 requires only 3 passes through the same algorithm with different values, but each pass calculates the same number of values. i.e. the number of required calculations only increased linearly as the number of splits increases. The methods both included taking into account the covariance.

This was so long ago though that I can't remember the details.

MGP
 

MGP

Well-Known Member
#20
Ok, I found another version with a different name. Here's all the information needed to calculate the variance for 1D 99 vs 6 S17 DAS SPL1:

Code:
Full Deck
Split Card, -----	1	2	3	4	5	6	7	8	9	10			1	2	3	4	5	6	7	8	9	10
Card Total	20	11	12	13	14	15	16	17	18	19			12	13	14	15	16	17	18	19	20	21
Strategy	S	D	S	S	S	S	S	S	S	S												
Bust	0.420329234	0.414361097	0.415757843	0.417006132	0.417680459	0.403926459	0.403113214	0.40154437	0.399219939	0.39699035		Bust	0.428615332	0.422513073	0.423954445	0.425478655	0.426160748	0.411895159	0.411135732	0.409614336	0.406769221	0.404545784
17	0.147221162	0.172112389	0.171129995	0.171568463	0.172795286	0.172413488	0.173055547	0.173438539	0.17379058	0.175679263		17	0.14728528	0.172936889	0.17183324	0.172322201	0.173576625	0.173155152	0.173756871	0.17409339	0.175270751	0.176319163
18	0.113260275	0.096529176	0.109376817	0.108394081	0.108610981	0.110812856	0.109643059	0.11025253	0.110609709	0.110763888		18	0.100132614	0.082945051	0.096332942	0.095216388	0.095426085	0.097745091	0.096509632	0.097084688	0.097319226	0.098367638
19	0.112106071	0.110688275	0.097594852	0.110490375	0.109195642	0.109474317	0.110898842	0.110587526	0.111098884	0.111368696		19	0.113501681	0.111614512	0.098089032	0.111530534	0.110124394	0.110438127	0.111908592	0.111575995	0.112018907	0.112245035
20	0.10447983	0.10421919	0.103580293	0.090369314	0.103015457	0.101909154	0.103044012	0.103558173	0.103292644	0.103639545		20	0.106292679	0.106342172	0.105408624	0.091748374	0.104931208	0.103685662	0.104928898	0.105454853	0.105099309	0.105448779
21	0.102603428	0.102089872	0.102560198	0.102171635	0.088702175	0.101463727	0.100245327	0.100618861	0.101988244	0.101558258		21	0.104172414	0.103648304	0.104381716	0.103703848	0.089780939	0.103080808	0.101760276	0.102176739	0.103522588	0.103073602
EV(Stand)	0.690313314	-0.171277805	-0.168484313	-0.165987735	-0.164639082	-0.192147082	-0.193773571	-0.02347272	0.256630746	0.478235697		EV()	-0.142769335	-0.154973854	-0.15209111	-0.149042689	-0.147678503	-0.00305453	0.266294837	0.473160822	0.687855516	0.896926398
EV(Double)		0.660164347										Deck	4	3	4	4	4	3	4	4	2	16
Stand lose	0.102603428	0.585638903	0.584242157	0.582993868	0.582319541	0.596073541	0.596886786	0.42501709	0.316379772	0.205197803		Stand lose	0.571384668	0.577486927	0.576045555	0.574521345	0.573839252	0.414949689	0.318597765	0.207631592	0.103522588	0
Stand win	0.792916742	0.414361097	0.415757843	0.417006132	0.417680459	0.403926459	0.403113214	0.40154437	0.573010518	0.683433501		Stand win	0.428615332	0.422513073	0.423954445	0.425478655	0.426160748	0.411895159	0.584892602	0.680792413	0.791378104	0.896926398
Strat lose	0.102603428	0	0.584242157	0.582993868	0.582319541	0.596073541	0.596886786	0.42501709	0.316379772	0.205197803												
Strat win	0.792916742	0	0.415757843	0.417006132	0.417680459	0.403926459	0.403113214	0.40154437	0.573010518	0.683433501		Deck for N	4	3	4	4	4	3	4	4	0	16
EV	0.690313314	0.660164347	-0.168484313	-0.165987735	-0.164639082	-0.192147082	-0.193773571	-0.02347272	0.256630746	0.478235697		Adjust -N's	4	3	4	4	4	3	4	4	2	16
nCards Left	4	4	4	4	4	3	4	4	2	16		p(x)	1/12	1/16	1/12	1/12	1/12	1/16	1/12	1/12	1/24	1/3
p(x)	4/49	4/49	4/49	4/49	4/49	3/49	4/49	4/49	2/49	16/49	1	EV(x)	0.330082174									
pLose x	0.00837579	0	0.047693237	0.047591336	0.047536289	0.036494298	0.048725452	0.034695273	0.01291346	0.067003364		pLose	0.047615389	0.036092933	0.048003796	0.047876779	0.047819938	0.025934356	0.026549814	0.017302633	0.004313441	0
pWin x	0.064727897	0	0.033939416	0.034041317	0.034096364	0.024730191	0.032907201	0.032779132	0.023388184	0.223161959		pWin	0.035717944	0.026407067	0.035329537	0.035456555	0.035513396	0.025743447	0.04874105	0.056732701	0.032974088	0.298975466
pEV(x)	0.056352107	0.053890967	-0.013753821	-0.013550019	-0.013439925	-0.011764107	-0.015818251	-0.00191614	0.010474724	0.156158595												
EV(x)	0.20663413																				1/3
x NetLose 1	0.3510285	x NetLose 2	0.024612986															
x NetWin 1	0.503771663	x NetWin 2	0.051558469																
Net		0.152743163			0.026945484	Net 0.20663413													

		EV(x)		EV(x)		Var(x)		-2		-1		0		1		2	
Full Deck	0.20663413	0.20663413	1.116788321	0.024612986	0.3510285	0.069028382	0.503771663	0.051558469

Covariance
x, x	0.636027044

SPL1		p	EV		pEV		pNet Var	Net Var		Var1		Var2		Var3	Var4	Cov(1,2)	Cov(1,3)	Cov(1,4)	Cov(2,3)	Cov(2,4)	Cov(3,4)
xx		1	0.41326826	0.41326826	3.505630729	3.505630729	1.116788321	1.116788321	0	0	0.636027044	0		0		0		0		0
Net (EV,Var)	1	0.41326826	3.505630729											

Net Covar	0.636027044																				


These are the Covariance Calcs.  I don't have the energy to fix all the formatting:
		EV(x)		Var(x)		-2		-1		0		1		2														
Full Deck	0.20663413	1.116788321	0.024612986	0.3510285	0.069028382	0.503771663	0.051558469														

Split Card, -----	1	2	3	4	5	6	7	8	9	10		Doubles									
Card Total	20	11	12	13	14	15	16	17	18	19											
Strategy	S	D	S	S	S	S	S	S	S	S											
Bust	0.420329234	0.414361097	0.415757843	0.417006132	0.417680459	0.403926459	0.403113214	0.40154437	0.399219939	0.39699035											
17	0.147221162	0.172112389	0.171129995	0.171568463	0.172795286	0.172413488	0.173055547	0.173438539	0.17379058	0.175679263											
18	0.113260275	0.096529176	0.109376817	0.108394081	0.108610981	0.110812856	0.109643059	0.11025253	0.110609709	0.110763888											
19	0.112106071	0.110688275	0.097594852	0.110490375	0.109195642	0.109474317	0.110898842	0.110587526	0.111098884	0.111368696											
20	0.10447983	0.10421919	0.103580293	0.090369314	0.103015457	0.101909154	0.103044012	0.103558173	0.103292644	0.103639545											
21	0.102603428	0.102089872	0.102560198	0.102171635	0.088702175	0.101463727	0.100245327	0.100618861	0.101988244	0.101558258		12	13	14	15	16	17	18	19	20	21
Prob	0.081632653	0.081632653	0.081632653	0.081632653	0.081632653	0.06122449	0.081632653	0.081632653	0.040816327	0.326530612		0.083333333	0.0625	0.083333333	0.083333333	0.083333333	0.0625	0.083333333	0.083333333	0.041666667	0.333333333


Total	Stiff	17	18	19	20	21							
Bet 1	0.387755102	0.081632653	0.040816327	0.326530612	0.081632653	0							
Bet 2	0.032312925	0.005102041	0.006802721	0.006802721	0.003401361	0.027210884							

	-2	-1	0	1	2	Sum							
Bust	0	0	0	0.918367347	0.081632653	1							
17	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	1							
18	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	1							
19	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	1							
20	0.051020408	0.836734694	0.085034014	0	0.027210884	1							
21	0.054421769	0.918367347	0.027210884	0	0	1							

				H2					p*SS				
C - 1	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.420329234	1	1	0	0	0	0.918367347	0.081632653	0	0	0	0.242970226	0.048819792
17	0.147221162	1	1	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	-0.008328185	-0.054648328	-0.002093335	0.041604841	0.009262083
18	0.113260275	1	1	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	-0.007418683	-0.050893051	-0.000884166	0.029097693	0.006029279
19	0.112106071	1	1	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	-0.008678187	-0.054754798	-0.006126091	0.005760233	0.004882775
20	0.10447983	1	0	0.051020408	0.836734694	0.085034014	0	0.027210884	0.002430574	0.021797059	0.000379341	0	-0.001053528
21	0.102603428	1	-1	0.054421769	0.918367347	0.027210884	0	0	0.014867586	0.13719223	0.000696117	0	0
p(Net)	0.081632653								0.030278488				

				H2									
C - 2	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.414361097	1	2	0	0	0	0.918367347	0.081632653	0	0	0	0.541424398	0.108787923
17	0.172112389	0.395833333	-2	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	0.027080026	0.177695156	0.006806712	-0.135282798	-0.0301167
	0.172112389	0.0625	0	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	0.002535834	0.01663977	0.000637396	-0.012668182	-0.002820195
	0.172112389	0.541666667	2	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	-0.022008358	-0.144415616	-0.005531921	0.109946434	0.024476311
18	0.096529176	0.458333333	-2	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	0.017585901	0.120641379	0.002095905	-0.068975739	-0.014292335
	0.096529176	0.083333333	0	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	0.001646783	0.011297127	0.000196265	-0.006459042	-0.001338366
	0.096529176	0.458333333	2	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	-0.014292335	-0.098047125	-0.001703375	0.056057656	0.011615603
19	0.110688275	0.541666667	-2	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.02383188	0.150366636	0.01682336	-0.015818648	-0.013408989
	0.110688275	0.083333333	0	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.00223167	0.014080666	0.001575377	-0.001481293	-0.001255648
	0.110688275	0.375	2	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	-0.019368539	-0.122205303	-0.013672607	0.012856062	0.010897694
20	0.10421919	0.625	-2	0.051020408	0.836734694	0.085034014	0	0.027210884	0.025891206	0.232188875	0.00404085	0	-0.011222499
	0.10421919	0.041666667	0	0.051020408	0.836734694	0.085034014	0	0.027210884	0.00242451	0.021742683	0.000378394	0	-0.0010509
	0.10421919	0.333333333	2	0.051020408	0.836734694	0.085034014	0	0.027210884	-0.021042186	-0.188703509	-0.003284062	0	0.0091207
21	0.102089872	0.666666667	-2	0.054421769	0.918367347	0.027210884	0	0	0.027053034	0.249634745	0.001266653	0	0
	0.102089872	0.333333333	0	0.054421769	0.918367347	0.027210884	0	0	0.002533306	0.023376353	0.000118612	0	0
	0.102089872	0	2	0.054421769	0.918367347	0.027210884	0	0	-0.021986421	-0.202882039	-0.001029429	0	0
p(Net)	0.081632653							p*Dist	0.071284546				

				H2									
C - 3	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.415757843	1	1	0	0	0	0.918367347	0.081632653	0	0	0	0.240327745	0.04828884
17	0.171129995	1	-1	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	0.014723408	0.096612845	0.003700809	-0.073553248	-0.016374448
18	0.109376817	1	-1	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	0.010896238	0.074749493	0.001298625	-0.042737422	-0.008855542
19	0.097594852	1	-1	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.011490234	0.072497336	0.008111167	-0.007626758	-0.006464971
20	0.103580293	1	-1	0.051020408	0.836734694	0.085034014	0	0.027210884	0.014071066	0.126187438	0.002196077	0	-0.00609908
21	0.102560198	1	-1	0.054421769	0.918367347	0.027210884	0	0	0.014861322	0.137134427	0.000695824	0	0
p(Net)	0.081632653							p*Dist	0.058459708				

				H2									
C - 4	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.417006132	1	1	0	0	0	0.918367347	0.081632653	0	0	0	0.241049316	0.048433825
17	0.171568463	1	-1	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	0.014761132	0.096860385	0.003710291	-0.073741706	-0.016416402
18	0.108394081	1	-1	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	0.010798337	0.074077878	0.001286957	-0.042353431	-0.008775976
19	0.110490375	1	-1	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.013008476	0.082076643	0.009182921	-0.008634506	-0.007319209
20	0.090369314	1	-1	0.051020408	0.836734694	0.085034014	0	0.027210884	0.012276395	0.110093067	0.001915982	0	-0.005321182
21	0.102171635	1	-1	0.054421769	0.918367347	0.027210884	0	0	0.014805018	0.136614875	0.000693187	0	0
p(Net)	0.081632653							p*Dist	0.057884267				

				H2									
C - 5	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.417680459	1	1	0	0	0	0.918367347	0.081632653	0	0	0	0.241439108	0.048512146
17	0.172795286	1	-1	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	0.014866684	0.097552998	0.003736822	-0.074269006	-0.01653379
18	0.108610981	1	-1	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	0.010819944	0.07422611	0.001289532	-0.042438182	-0.008793537
19	0.109195642	1	-1	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.012856041	0.081114864	0.009075315	-0.008533326	-0.007233442
20	0.103015457	1	-1	0.051020408	0.836734694	0.085034014	0	0.027210884	0.013994335	0.125499322	0.002184101	0	-0.00606582
21	0.088702175	1	-1	0.054421769	0.918367347	0.027210884	0	0	0.012853247	0.118604704	0.000601803	0	0
p(Net)	0.081632653							p*Dist	0.057580406				

				H2									
C - 6	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.403926459	1	1	0	0	0	0.918367347	0.081632653	0	0	0	0.233488644	0.046914666
17	0.172413488	1	-1	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	0.014833835	0.097337451	0.003728565	-0.074104905	-0.016497258
18	0.110812856	1	-1	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	0.011039297	0.075730899	0.001315675	-0.043298533	-0.008971809
19	0.109474317	1	-1	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.012888851	0.081321875	0.009098476	-0.008555104	-0.007251902
20	0.101909154	1	-1	0.051020408	0.836734694	0.085034014	0	0.027210884	0.013844047	0.12415156	0.002160646	0	-0.006000678
21	0.101463727	1	-1	0.054421769	0.918367347	0.027210884	0	0	0.014702439	0.135668322	0.000688385	0	0
p(Net)	0.06122449							p*Dist	0.043728578				

				H2									
C - 7	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.403113214	1	1	0	0	0	0.918367347	0.081632653	0	0	0	0.23301855	0.04682021
17	0.173055547	1	-1	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	0.014889076	0.097699931	0.00374245	-0.074380868	-0.016558693
18	0.109643059	1	-1	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	0.010922761	0.074931445	0.001301786	-0.042841451	-0.008877098
19	0.110898842	1	-1	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.013056566	0.082380069	0.009216869	-0.008666426	-0.007346267
20	0.103044012	1	-1	0.051020408	0.836734694	0.085034014	0	0.027210884	0.013998214	0.12553411	0.002184706	0	-0.006067502
21	0.100245327	1	-1	0.054421769	0.918367347	0.027210884	0	0	0.014525889	0.134039185	0.000680118	0	0
p(Net)	0.081632653							p*Dist	0.058302337				

				H2									
C - 8	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.40154437	1	1	0	0	0	0.918367347	0.081632653	0	0	0	0.232111684	0.046637994
17	0.173438539	1	0	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	0.002555373	0.016767982	0.000642307	-0.012765792	-0.002841925
18	0.11025253	1	-1	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	0.010983477	0.075347965	0.001309022	-0.043079594	-0.008926443
19	0.110587526	1	-1	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.013019914	0.082148811	0.009190995	-0.008642098	-0.007325644
20	0.103558173	1	-1	0.051020408	0.836734694	0.085034014	0	0.027210884	0.014068061	0.126160491	0.002195608	0	-0.006097777
21	0.100618861	1	-1	0.054421769	0.918367347	0.027210884	0	0	0.014580015	0.134538642	0.000682653	0	0
p(Net)	0.081632653							p*Dist	0.056592794				

				H2									
C - 9	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.399219939	1	1	0	0	0	0.918367347	0.081632653	0	0	0	0.230768052	0.04636802
17	0.17379058	1	1	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	-0.009831196	-0.064510866	-0.002471125	0.049113384	0.010933637
18	0.110609709	1	0	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	0.001886996	0.012945018	0.000224894	-0.00740121	-0.001533591
19	0.111098884	1	-1	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.013080118	0.082528668	0.009233495	-0.008682059	-0.007359518
20	0.103292644	1	-1	0.051020408	0.836734694	0.085034014	0	0.027210884	0.01403199	0.125837008	0.002189978	0	-0.006082142
21	0.101988244	1	-1	0.054421769	0.918367347	0.027210884	0	0	0.014778444	0.13636966	0.000691943	0	0
p(Net)	0.040816327							p*Dist	0.026249371				

				H2									
C - 10	Dealer	Prob	H1	-2	-1	0	1	2	-2	-1	0	1	2
Bust	0.39699035	1	1	0	0	0	0.918367347	0.081632653	0	0	0	0.229479244	0.046109061
17	0.175679263	1	1	0.032312925	0.387755102	0.086734694	0.448979592	0.044217687	-0.009938037	-0.065211943	-0.00249798	0.049647128	0.01105246
18	0.110763888	1	1	0.037414966	0.469387755	0.047619048	0.408163265	0.037414966	-0.007255167	-0.049771309	-0.000864678	0.028456346	0.005896387
19	0.111368696	1	0	0.044217687	0.510204082	0.333333333	0.081632653	0.030612245	0.002245389	0.014167223	0.001585061	-0.001490399	-0.001263366
20	0.103639545	1	-1	0.051020408	0.836734694	0.085034014	0	0.027210884	0.014079115	0.126259622	0.002197333	0	-0.006102568
21	0.101558258	1	-1	0.054421769	0.918367347	0.027210884	0	0	0.014716137	0.135794721	0.000689026	0	0
p(Net)	0.326530612							p*Dist	0.175666549
It gets a bit more complicated for higher levels of splits.
 
Top