The +- is the standard deviation = sqrt(variance). icnt incorporated variance into his calculations.
The problem I'm having is I don't think the EVs are right for this 8 deck H17 A-5 versus 5 example. At one point I went ahead and incorporated variance into a version of my CA also. I found that variance for non-splits can be computed efficiently enough, but even 1 split takes a lot of time.
Computing variance in a CA was not familiar to me and I learned how to do it from icnt. In checking with the forum from time to time over the past few years I think I saw that Eric was able to compute variance for 1 split efficiently enough that he could use it in his CA to analyze SCORE.
Anyway, right or wrong, this is what my variance version outputs for 8 deck, H17, A-5
k_cCode:Shoe comp (A-5): {32, 32, 32, 32, 32} Shoe comp (6-T): {32, 32, 32, 32, 128} Player hand composition: 1, 0, 0, 0, 1, 0, 0, 0, 0, 0: Soft 16, 2 cards Up card Stand Hit Double Split 1 Split 2 Split 3 Surr Strat 1 -0.72201 -0.45321 -0.71861 hit ±0.69188 ±0.85223 ±1.54439 2 -0.28343 -0.02103 -0.06959 hit ±0.95899 ±0.97494 ±1.94940 3 -0.24288 0.00880 -0.00566 hit ±0.97006 ±0.97592 ±1.95219 4 -0.20029 0.04109 0.06139 dbl ±0.97974 ±0.97790 ±1.95287 5 -0.15815 0.07500 0.12948 dbl ±0.98742 ±0.97666 ±1.95124 6 -0.11617 0.11007 0.20052 dbl ±0.99323 ±0.97413 ±1.94702 7 -0.47431 -0.00713 -0.18421 hit ±0.88036 ±0.95959 ±1.93442 8 -0.51090 -0.06873 -0.31646 hit ±0.85964 ±0.94809 ±1.91511 9 -0.54107 -0.15072 -0.45592 hit ±0.84098 ±0.93731 ±1.88550 10 -0.57456 -0.26880 -0.55300 hit ±0.81846 ±0.92515 ±1.80270 Overall hand EV vs all upcards: -0.10556 ±1.25735 Press c or C for values conditioned on no dealer BJ, any other key to exit
The single deck S17 NDAS overall EVs for 1, 2, 3 allowed splits are
.0243%, .0404%, .0413% for CDZ-
.0248%, .0410%, .0419% for CDP1
Since it is NDAS there is no doubling, only possibly resplitting and hit/stand. There is only room for .0005% to .0006% improvement. One such improvement is standing on 9-3 versus 3 as a result of splitting 9-9 instead of hitting, which is the pre-split strategy. This is for single deck. Adding more decks would more sooner than later evaporate any possible gain completely.
The only reason you might want to do this is just for the sake of completeness.
k_c
My apologies... I honestly dont remember what i entered in my CA or what i copied and how i came up with two whacky values (i could blame Happy Hour for it ), but these are not the values i got today. Those are the real values. A,2 vs 5 is indeed super close! (Mia culpa Don!)
A,2.JPGA,4.JPGA5.JPG
The key to my CA is determining the probabilities of the outcomes of a playing decision. So for example for a stand, there are 4 outcomes, win 1 unit, loose 1 unit, win 0 unit (push), win 1.5 units (blackjack). Once the probabilities of all the outcomes are calculated, the expectation value and standard deviation can be easily computed using the formulas below
variance.JPG
For example in one of the hands in question, the probability of losing one unit for standing is 0.5795, the probability of pushing is 0 (makes sense since a dealer can never have same total), probability of winning one unit is 0.42049. Using the probabilities (pi) and the outcomes (xi) in above equations will yield expectation value (mu) and variance
Results.JPG
As far as computing the probabilities, for every dealer hand + player hand total composition in round possible for that given playing decision, the probability of drawing these cards from a given deck/shoe is computed and number is added to a variable that's accumulating a particular outcome. For example, for a player A,2 and dealer 5,10,10 the outcome for this round is a one unit win for the player, so the probability of drawing A,2,5,10,10 is computed and its value added to the variable for probability of winning +1 unit.
Last edited by iCountNTrack; 07-13-2021 at 04:25 PM. Reason: clarified methodology
Chance favors the prepared mind
Great post!
I guess my next question is: why do we care? The reason we have CDZ- and CDP is they both offer some trade-off. Namely both simplicity and accuracy. CDZ- is simple because it follows how you and I would follow basic strategy. That is, we follow all split hands like our pre-split hands. CDP offer us accuracy for our overall EV of some round, for which if we follow a new strategy using all available information post-split.
Unless I am missing something about CDZ, why would I use it over CDP?
I agree that the best way is to store probabilities of expectations to compute EV and Var for some random X. Needs more memory than a simple double-float EV variable definitely.
@iCountNTrack:
When you compute ordered subsets for computing player/dealer probabilities, how do you do it? Do you use a pre-computed library ala Eric's Steiner Tree algo? How do you handle the "probability multipliers" for each subset? Do you store dealer probabilities or directly compute player values?
Last edited by lij45o6; 07-13-2021 at 08:39 PM. Reason: additional question
I honestly lost my source code, it's somewhere on my older machine but computer wont start and havent gotten around fixing it... From memory, nothing is pre-computed, everything is computed from scratch. I felt precomputing things was a bit cheating but that's just me. As far as calculations itself:
***All possible dealers hand compositions are generated based on shoe composition, their multipliers are also computed
***Player's hands based on each strategy are dealt out
***Probability of the round with all the cards drawn out (dealer + player cards) is computed and multiplied by dealer's hand multiplicity
I remember using 0 recursion and just giant ~13 nested loops.
I also found an old email detailing my algorithm if interested (which i think is really straightforward just computationally more expensive)
************************************************** ************************************************** ************************************************** *****************************
Suppose that the player has an 8,8 and that the dealer is showing a 6, splitting the hand will result in two split hands, split hand 1 (SH1) and split hand 2 (SH2). So at this stage we have one 8 in SH1 and one 8 in SH2.
We now play SH1:
we receive an ace, so now SH1 has 8,1. At this stage we have 3 choices : stand, hit and double, we need to find the optimum playing decision i.e the one that yields the highest expectation value (EV). However we need to take into account the fact that the deck has one less 8 (that is present in SH2). After we calculate the EV for each playing decision, we find that doubling is the optimum play. We double and we receive another ace. So in SH1 we now have 8,1,1. At this point we have to play the second split hand.
We now play SH2:
We receive an ace, so now SH2 has 8,1. Again we have to chose the optimum playing decision by calculating the EV for each of the allowed plays, however again we have to take into account the cards present in SH1 (8,1,1) i.e a depleted deck missing one 8 and two aces. Again doubling returns the highest EV and is the optimum play. So we double the hand and receive another ace. So in SH2 we now have 8,1,1. And now it is time to play the dealer hand.
We now play dealer hand:
The dealer is showing a 6, and since we have dealt all the aces present in the deck, the first possible dealer hand would be 6,2,2,2,2,3, with a hand total of 18. It is time to resolve the round.
Resolving the round:
So since SH1 and SH2 both have a total of 20, and the dealer has a total of 18, the net outcome on this round is +4 units because we had two doubled hands ((+2) + (+2)) . So now what we will need to do is to calculated the probability of randomly drawing the following sequence: 8,1,1,8,1,1,6,2,2,2,2,3 for one deck of cards, and then add that value to the variable of type double that is accumulating the probability of a net outcome of +4 units.
Once we loop through all the possible combinations of SH1, SH2 and dealer hand, we will have the unormalized probabilities of all the possible outcomes. After normalization, calculating all the EV and the SD is straightfoward.
The same approach also applies when 2 or 3 splits are allowed. But again one of the key ideas is that with post-split optimal strategy, you have to take into account all the cards dealt and re-compute the optimal strategy at every point.
So for instance if we are playing the 4th split hand (SH4) which has 8,3, and we have 8,10 in SH3, 8,2,2 in SH2 and 8,1,1 in SH1. We have to find the EV of each playing decision while taking into account that the deck has now one less 10, three less 8s, two less 2, and two less aces. Doubling would be the optimum play here. So we double and we get a 5, so now we have the following compositions for all 4 split hands.
SH1: 8,1,1 hand total = 20 doubled hand
SH2: 8,2,2 hand total = 12 doubled hand
SH3: 8,10 hand total = 18 stand
SH4: 8,3,5 hand total = 16 double hand
assuming we have the same dealer sequence (6,2,2,2,2,3) with a total of 18, the net outcome for this round is +2 + (-2) + (0) + (-2) = -2
So we calculate the probability of drawing the sequence 8,1,1,8,2,2,8,10,8,3,5,6,2,2,2,2,3 and add that value to the variable accumulating a net outcome of -2.
Last edited by iCountNTrack; 07-13-2021 at 09:49 PM.
Chance favors the prepared mind
Thanks!
This makes sense. From what I can see, you took out much redundancy in re-computing dealer probabilities. That is, each player + dealer hand can be expressed a subset that exists in the set of all shoe states. You just mapped some shoe subset probability to each player/hand expectation (times some dealer up-card multiplier.)
I agree with the lack of recursion but, 13 for loops? Seems like a lot? What was that for?
To clarify, the tradeoff is between simplicity and *optimality*, not accuracy (at least in the sense of our ability to compute the exact EV corresponding to any of CDZ-, CDP1, CDP, or CDPN).
Along the same line, why would we bother using a *total*-dependent strategy over CDZ-? In each of these cases, we're making different assumptions about the sophistication that we're demanding out of the player. Imagine giving our player a laminated card on which we print the playing strategy for them to use. On the card is a table, with a list of playing situations, and for each the corresponding strategy action (stand, hit, double, split, etc.).
Total-dependent zero-memory is one "type" of such a card, where each "playing situation" is indicated on the card by the *total* of a hand, whether it's hard or soft, and the dealer up card. That's the extent of our "expressive power" in specifying the strategy on the card. The advantage of this is that it's simple: the table is relatively short, and thus easy for the player to memorize. (Note that there are many possible laminated cards that live in this "total-dependent zero-memory" category. They are all equally short and simple to memorize... what started this discussion was my claim that we don't know of an efficient, provably correct algorithm for determining which of these possible strategy cards yields the (provably) maximum possible overall expected return, among all possible such cards.)
CDZ is worth considering, because it's an entirely different class of laminated card. It takes a lot more information to specify composition-dependent strategy, even if it's still zero-memory. (In principle, we need to specify all possible tuples of (player hand composition, dealer up card), but in practice there is some achievable "compression" by expressing things in terms of hand total, with a shorter list of composition-dependent departures.) Here as well, CDZ- is just one particular laminated card of this type that we know how to efficiently construct, but there are in general other cards of the same type and complexity that yield better overall EV, as the examples here have shown.
CDP1 is yet another still-more complicated strategy, requiring significantly more information to even specify, and thus for a player to memorize. I've been able to practice and be pretty good at actually playing CDZ- strategy as a human (using my game with its training modes), but I wonder if *anyone* has ever actually tried to learn-- and play at the table-- CDP1 strategy? This laminated card would be about an order of magnitude larger, with over a thousand individual departures from the already-complicated CDZ- strategy.
And CDP is yet again multiplicatively more complex: the player must keep track of not just the current hand, but the current hand, what pair was split if there was one, and the number of pair cards that were drawn to all initial split hands so far, with a possibly-different playing strategy for each of those (hand, pair card, number of pair cards drawn) tuples.
And beyond this is what as far as I know only ICountNTrack has computed, the truly optimal overall expected value by playing *perfect* (EV-maximizing) strategy... where strategy within a split is allowed to vary depending on the *exact composition of all cards in all hands previously split*.
In short, I agree with what I think is Don's point in his comment: when we talk about "basic" strategy, basic is in the eye of the beholder, and a CDP player requires a better memory than a CDZ player (which in turn needs a better memory than a TDZ player-- and there are intermediate possibilities in between, such as that outlined in BJA3).
E
Thanks, Eric. Lovely post. Again, I've always had a problem calling CDP1, CDP, and beyond "basic" strategy, because, well, they're really just a form of card counting. None can deny that we're reckoning all the cards we see. How can that suddenly become anyone's definition of "basic" strategy? Finally, what sense does it really make to permit the reckoning of every card in four split hands (maybe even 20 cards) in what we will call basic strategy but not permitting the reckoning of our neighbor's two cards while we play our two-card holding? The former is "permitted" within the realm of someone's definition of "basic" strategy but the latter is not? It's a purely arbitrary convention that I simply cannot abide.
Don
Unfortunately BJ Math is down but in an email to k_c I mentioned that yours was the "actual" and on BJMath at some point I believe I said the same. The hands that Steve Jacobs pointed out though that take into account the effects of removal actually give closer values to the brute force/sim ones for BBO and OBBO. I mentioned in the email I think the post-split hands are the same shoe state when done with a sim due to the fact that they're played out before the dealer hand, however, with BBO and OBBO the effects of removal matter.
Anyways, I am not misunderstanding you. The example you give is a good one. It does give a higher overall EV. But what I am saying is that I don't think it's a matter of methodology missing local minima that needs something really special to find them. I will restate that a fully CDZ+ strategy is ONLY dependent on the shoe states I shared above and if you take all the CDP/CDN hands and play those out optimally then you will have a complete and full CDZ+ strategy. So in order to get a fully CDZ+ strategy I am saying you simply do the same kind of calculation but use the pair hand options in the calc, go through it again if there is a strategy change to make sure and that is enough.
Last edited by MGP; 07-14-2021 at 10:07 PM.
No updates. Nairn is saying he got it but the fact is that Cacarulo and I got it years before he did. We were first and it was based on my questions and ideas. Period. Even Eric's mini-paper was out before his (which again was based on my ideas even if a different hand order was used, and I have the emails to prove it, but Eric updated this). The fact that he assumes he's correct means he needed reference numbers. We provided those in the forums and Cacarulo provided them in Don's book. We got our initial couple of verifications from brute force calcs from Ken Smith. Nairn knows he's taking credit for other's work but Eric mentioned he talked to him before so if I go after him it'll have to be through his department and that risks his job. If he tries to actually publish it and not just arxiv it I'll have to bring it up. Hopefully he gets some sense before he pushes it further for publication.
I initially used Eric's dealer prob calcs and modified them slightly for splits but not that much. They are very fast.
I also save them all and re-use them for the various shoe states. Dealer probs for any player hand with 2 or more of the same card can be used for post-split calculations. You just change the player total accordingly. You can see how I do that in my CA. Since there are only a few thousand player hands total, it doesn't take long at all.
Last edited by MGP; 07-14-2021 at 09:37 PM.
Bookmarks