My fixed strategy CA computes split EVs efficiently by adapting to removal of generic non-pair cards in a a shoe composition, represented by np and to (generic) pair cards represented by p. I decided to see if I could implement the same methodology for optimal splits.
The fixed strategy algorithm requires the ability to compute EVx (= draw to a single pair card with 0 splits remaining) and EVPair (= draw to 2 unsplit pair cards) for shoe states of (2*allowedSplits-2) pair cards removed from initial shoe comp. Initial shoe comp is defined as shoe composition after 2 pair cards and dealer up card have been dealt. It requires removal of only p cards to compute split EVs.
if we let array pP[2*allowedSplits-2] = prob of drawing a pair card from each of relevant shoe states with (2*allowedSplits-2) pair cards removed,
underlying relationship for a fixed strategy is
EV(non-pair card) = (EVx[2*allowedSplits-2] - pP[2*allowedSplits-2]*EVPair[2*allowedSplits-2]) / (1 - pP[2*allowedSplits-2])
where EVPair[2*allowedSplits-2] refers to shoe state before matching p card is drawn
The same type of relationship applies also to optimal splits except EVx is replaced by optx as described below.
For fixed strategy drawing a matching p card to a single pair card results in one of 2 cases:
1, resplit occurs if more p cards & remaining splits are available
2. generic drawing sequence is concluded when no more p cards and/or splits remain
For optimal splits the value of an unsplit pair may apply when a matching p card is drawn to a single pair card. This is the only difference between fixed and optimal when a generic p card is drawn. Not addressing this difference results in output relative to splitting at every opportunity.
When a generic np card is drawn to a single p there is no difference since EV(non-pair card drawn) is the same whether the value of EVPair is for an unsplit or split pair. A generic np card is never algorithmically removed but is instead computed relative to not removing a p card so in the end only removal of p cards needs to be considered.
Difference in split EV comes from the handling of x hands (where no more splitting is allowed). Instead of drawing to a single pair card with a fixed strategy whose EV for each number of p removed is stored in EVx[pRem], we have optimal EV of drawing to (pRem + 2) p cards whose EV is stored in
optx[pRem].
Code:
number of hands p removed EV
Fixed strategy n pRem n*EVx[pRem]
Optimal strategy n pRem optx[pRem] where pRem = (n-2)
In order to compute SPL1 we need optimal EV of drawing to 2 p cards with 0 splits remaining (optx[0])
In order to compute SPL2 we need optimal EV of drawing to 2,3,&4 p cards with 0 splits remaining (optx[0] to optx[2])
In order to compute SPL3 we need optimal EV of drawing to 2,3,4,5,&6 p cards with 0 splits remaining (optx[0] to optx[4])
In order to compute SPLn we need optimal EV of drawing to 2,3,...,&2*n p cards with 0 splits remaining (optx[0] to optx[2*n-2])
Example: compute optimal SPL2, 6-6 v 6 dealt from shoe comp {0,0,0,0,0,11,0,5,0,0}
Code:
Pair cards present in shoe: 8 Non-pair cards present in shoe: 5
Number of allowed splits for which to display data (1 - 9): 2
Allowed splits: 2 Expected number of hands: 2.8717948718 = 112/39
P removed optx(pRem + 2) multiplier EVPair(pRem) multiplier
0 1.00000000000 -1.23076923077 = -16/13
1 0.82051282051 = 32/39 0.35897435897 = 14/39
2 -0.17948717949 = -7/39 0.00000000000
Press x to exit, i to reinput p & np, any other key to reinput num splits
optx[0] = -0.013986013986014 = -2/143 = EV(draw to 2 pair cards, 0 splits remain) EVPair[0] = -1/132
optx[1] = -1/33 = EV(draw to 3 pair cards, 0 splits remain) EVPair[1] = 1/33
optx[2] = -2/33 = EV(draw to 4 pair cards, 0 splits remain)
EV(SPL2_forcedResplit) = 1*optx[0] - 16/13*EVPair[0] + 32/39*optx[1] + 14/39*EVPair[1] - 7/39*optx[2]
EV(SPL2_forcedResplit) = -2/143-32/39*1/33+7/39*2/33+16/13*1/132+14/39*1/33 = -0.0077700077700077700077700077700078
The algorithm gets the correct optimal SPL2 value of the simple example for splitting at every opportunity. I only have an algorithm to compute EV of drawing to 2 p cards with 0 splits remaining so I can't check values in general for more than 1 allowed split. For the simple example I am able to determine the needed values.
If it turns out that the algorithm works in general this would mean that computing optimal splits efficiently would only depend upon being able to compute optimal EV of drawing to a string of individual pair cards (with 0 splits remaining) efficiently as computation time of other needed values is negligible.
Regarding further optimization by declining to resplit at some point rather than resplitting at every opportunity: what happens here is that number of expected hands is variable as opposed to fixed as would be the case for forced resplitting. Suppose the rules allowed an unlimited number of resplits. If that was the rule then wouldn't we be obligated to explore all possibilities up to the point where all pair cards are eliminated and wouldn't this amount to splitting at every opportunity? In other words optimizing by declining to resplit may only apply to some limited number of allowed resplits and to find the limitations we'd need to split at every opportunity if rule was unlimited resplits.
k_c
Bookmarks