See the top rated post in this thread. Click here

Page 1 of 3 123 LastLast
Results 1 to 13 of 28

Thread: MGP's BJCA

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Jun 2015
    Location
    In orbit around Saturn
    Posts
    897


    Did you find this post helpful? Yes | No

    MGP's BJCA

    Hello,

    In MGP's BJCA, with "Early surrender" and "American rules (OBO)" surrender EV against X or Ace is NOT -50%
    How is it possible ?

    Early surrender and ENHC or Late surrender and American rules (OBO) are OK

  2. #2


    2 out of 2 members found this post helpful. Did you find this post helpful? Yes | No

    Early Surrender EV

    Phoebe,

    Let's consider a particular case, so I can illustrate my point with numbers.

    I ran MGP's BJCA for a SD game with ES (good luck finding THIS game!). When I checked the Composition-Dependent EV's for the hand of 8,9 vs. A, I got an Early Surrender EV of -0.257575757... or -17/66, if you prefer rational fractions.

    So why didn't we get -0.5?

    The answer is that the EV's shown for American-style rules are traditionally the "No Blackjack EV's": in other words, they're the EV's if the dealer does NOT have BJ. The reason for showing the NoBJEV's is that, with American-style rules, these are (typically) the EV's once the player gets to act on his hand. However, with ES the player gets to act BEFORE the dealer checks for BJ (just like in a ENHC game).

    So, how are the EV's before and after checking for BJ related? Here's the equation:

    EV = -1*Pdbj + NoBJEV*(1-Pdbj)

    where "Pdbj" is the probability that the dealer has a BJ, "NoBJEV" is the EV once we know the dealer does NOT have a BJ, and "EV" is the EV BEFORE the dealer checks for BJ.

    If we rearrange to solve for NoBJEV, we get:

    NoBJEV = (EV + Pdbj)/(1-Pdbj)

    For our case, EV = -1/2 (obviously), and Pdbj = 16/49 (since three non-X's have been removed from a single deck). Plugging these into the equation gives:

    NoBJEV = (-1/2 + 16/49)/(1 - 16/49) = -17/66 =
    -0.257575757...

    which is the value reported by the software.

    Hope this helps!

    Dog Hand

  3. #3
    Senior Member
    Join Date
    Jun 2015
    Location
    In orbit around Saturn
    Posts
    897


    Did you find this post helpful? Yes | No
    Thank you.
    It will help Don, too.

    Although it's a bit difficult for me to understand this convention even for ES as dealer can have BJ when you surrender (or not)
    And it led me to play 7 vs Ace in Fun21 incorrectly until I generated indexes in CVData
    Last edited by Phoebe; 06-09-2019 at 05:02 PM.

  4. #4


    Did you find this post helpful? Yes | No
    I checked this when we had our private discussion. But, for the special deck you described, and the missing tens, the probabilities didn't confirm the standard calculations that Dog Hand described. So, I concluded that something else had to be going on.

    For a discussion on the methodology, see also BJA3, pp. 392-393. I tried this, but it didn't work for your situation. Don't know why.

    Don

  5. #5
    Senior Member
    Join Date
    Jun 2015
    Location
    In orbit around Saturn
    Posts
    897


    Did you find this post helpful? Yes | No
    Basically, my problem was an EV for surrender different from -50%
    When I surrender I expect to lose half of my bet.

    For our case, EV = -1/2 (obviously)
    Whew ! (in reality I made "ouf !")
    "EV" displayed by MGP's BJCA is a pseudo (IMHO useless) EV
    Last edited by Phoebe; 06-07-2019 at 01:46 PM.

  6. #6


    Did you find this post helpful? Yes | No
    Quote Originally Posted by Phoebe View Post
    "EV" displayed by MGP's BJCA is a pseudo (IMHO useless) EV
    Yes, I have to agree.

    Don

  7. #7


    Did you find this post helpful? Yes | No
    z
    z

    Heads Up:

    If you lose 75% of the time, Surrendering is correct;
    but that fails to take into consideration the occasional "pushes."

    zz
    Last edited by SkinnyBJplayer; 06-09-2019 at 03:58 PM.

  8. #8


    Did you find this post helpful? Yes | No
    Quote Originally Posted by SkinnyBJplayer View Post
    z
    If you lose 25% of the time, Surrendering is correct;
    but that fails to take into consideration the occasional "pushes."z
    The number you want is 75%, and it is more correctly stated as "If you lose 75% of the time that you don't push ..." (since the EV of a push is zero, you must remove them from consideration).

    This rule of thumb applies only to hands that you don't double or split. For those hands, the ratio of wins and losses is not useful, since they can be for different amounts. Of course, the universal criteria is EV <= -50%.

  9. #9


    Did you find this post helpful? Yes | No
    As others have already explained, in this case the EV reported by MGP's CA isn't wrong, it just requires interpretation. And I have no reason to suspect the accuracy of any EVs reported for any integral number of decks. However, as a side effect of another analysis, it's worth noting that there do appear to be some errors in the EVs reported by this CA for some depleted shoes. Unfortunately, since there isn't a nice scriptable interface to his CA to allow automated "searching" for discrepancies, I only have some anecdotal examples that yield incorrect results, and those anecdotes are all what I would describe as "pathological" . For example, consider a shoe with two aces, two 6s, and a bunch of 10s (the exact number doesn't seem to matter). I suspect that the bug is in the pair split portion of the algorithm, but I don't have any more insight at this point. I'll let you know what I find.

  10. #10


    Did you find this post helpful? Yes | No
    Quote Originally Posted by ericfarmer View Post
    As others have already explained, in this case the EV reported by MGP's CA isn't wrong, it just requires interpretation. And I have no reason to suspect the accuracy of any EVs reported for any integral number of decks. However, as a side effect of another analysis, it's worth noting that there do appear to be some errors in the EVs reported by this CA for some depleted shoes. Unfortunately, since there isn't a nice scriptable interface to his CA to allow automated "searching" for discrepancies, I only have some anecdotal examples that yield incorrect results, and those anecdotes are all what I would describe as "pathological" . For example, consider a shoe with two aces, two 6s, and a bunch of 10s (the exact number doesn't seem to matter). I suspect that the bug is in the pair split portion of the algorithm, but I don't have any more insight at this point. I'll let you know what I find.
    Question: would these "errors" be the result of how MGP et. al. computed split hands? If so, I was under the impression that MGP and Cacarulo had found out the optimal splitting algorithm to get exact results for all in-order split hands.

    Now that I think about it: Certain split hand are dependent on the deck subset. Take for instance [22] vs 6; *assume SP1:

    We get two hands: {2x, 2x}, we cycle though all x's from Ace to Face (1-10).
    We then take the weighted expectations for each new [2x] hand and multiply by two. That is Split_22_6 = 2 * (EV_max[2A] + EV_max[22] + ... + EV_max[2T])

    What becomes an issue is that the right-most [2x] hand has an immediate effect on the outcome of the left-most [2x] hand. That is, the conditional expectation changes per card removed (and as an effect, changes the conditional probabilities for each dealer hand for up-card rank 6.) This would result in different weighted expectations and a different overall expectation for each split decision and overall strategy expectation.

    Sorry for the tangent. Just popped into my mind and would be interested in what others thought.

  11. #11


    Did you find this post helpful? Yes | No
    Quote Originally Posted by dogman_1234 View Post
    Question: would these "errors" be the result of how MGP et. al. computed split hands? If so, I was under the impression that MGP and Cacarulo had found out the optimal splitting algorithm to get exact results for all in-order split hands.
    Yes, I think the errors are due to the handling of split hands. I should clarify: you are correct that MGP's CA computes correct, exact expected values for splitting assuming any of CDZ-, CDP, or CDPN post-split playing strategies (although I'm not sure what you mean by "optimal"?)... almost all of the time, where I believe (but can't yet point to specific lines of code causing the problem) that the only time where reported values are in error are when some card ranks are missing from the depleted shoe being evaluated, as in the example described previously.

    However, although when I observe errors, there is always at least one card rank missing, I don't know if the converse is true; that is, I don't know if the reported values are always wrong when a card rank is missing. (If so, this is certainly not a negligible edge case-- dealing 5 decks into a 6-deck shoe, the probability of encountering such a subset is about 0.0913734).

    Quote Originally Posted by dogman_1234 View Post
    Now that I think about it: Certain split hand are dependent on the deck subset. Take for instance [22] vs 6; *assume SP1:

    We get two hands: {2x, 2x}, we cycle though all x's from Ace to Face (1-10).
    We then take the weighted expectations for each new [2x] hand and multiply by two. That is Split_22_6 = 2 * (EV_max[2A] + EV_max[22] + ... + EV_max[2T])

    What becomes an issue is that the right-most [2x] hand has an immediate effect on the outcome of the left-most [2x] hand. That is, the conditional expectation changes per card removed (and as an effect, changes the conditional probabilities for each dealer hand for up-card rank 6.) This would result in different weighted expectations and a different overall expectation for each split decision and overall strategy expectation.

    Sorry for the tangent. Just popped into my mind and would be interested in what others thought.
    I may misunderstand your description here, but as long as we assume that the strategy applied is the same for both halves of the split hand, the expected return from each of those halves is exactly the same... and when evaluating that expected return, we only need to "remove" one additional pair card from the shoe to compute the necessary probabilities of outcomes of the dealer's hand.

    Furthermore, this is true even if we are allowed to split more than once. That is, for example with SPL3, if we just condition on the subset of cases where we only split to exactly two hands (i.e., where we split our 2s, and neither of the drawn cards completing the two halves is another 2), then the expected return from both halves of the split is the same. (Actually, I recall having a discussion about exactly this perhaps-non-intuitive result with MGP on bjmath.com over 15 years ago.)

  12. #12


    Did you find this post helpful? Yes | No
    Quote Originally Posted by ericfarmer View Post
    Yes, I think the errors are due to the handling of split hands. I should clarify: you are correct that MGP's CA computes correct, exact expected values for splitting assuming any of CDZ-, CDP, or CDPN post-split playing strategies (although I'm not sure what you mean by "optimal"?)... almost all of the time, where I believe (but can't yet point to specific lines of code causing the problem) that the only time where reported values are in error are when some card ranks are missing from the depleted shoe being evaluated, as in the example described previously.

    However, although when I observe errors, there is always at least one card rank missing, I don't know if the converse is true; that is, I don't know if the reported values are always wrong when a card rank is missing. (If so, this is certainly not a negligible edge case-- dealing 5 decks into a 6-deck shoe, the probability of encountering such a subset is about 0.0913734).
    Interesting. No clue.


    I may misunderstand your description here, but as long as we assume that the strategy applied is the same for both halves of the split hand, the expected return from each of those halves is exactly the same... and when evaluating that expected return, we only need to "remove" one additional pair card from the shoe to compute the necessary probabilities of outcomes of the dealer's hand.

    Furthermore, this is true even if we are allowed to split more than once. That is, for example with SPL3, if we just condition on the subset of cases where we only split to exactly two hands (i.e., where we split our 2s, and neither of the drawn cards completing the two halves is another 2), then the expected return from both halves of the split is the same. (Actually, I recall having a discussion about exactly this perhaps-non-intuitive result with MGP on bjmath.com over 15 years ago.)
    Basically, for our split 22 vs 6, we will compute the overall expectation first by splitting both rank card into two separate 1-card hands: {2x, 2x}. We then compute the right-most 2x vs dealer 6 with the inclusion of a missing deuce, and cycle through all x's : 1-10. Now, when it comes to computing the left-most 2x, we must not only remove a deuce, (as we did with the right-most 2x), but we must also remove the given right-most x of the hand. That is, when we compute the left-most split, we must also do so for the removal of each additional x that we cycle through. Here is where the thinking is going in a visual manner:

    ---SPLIT 22 v 6---
    [22] -> {2x, 2x}; deck:[4 2 4 4 4 3 4 4 4 16]

    ---Remove 2 and draw first rank---
    {2x, 2x}; deck[4 2 4 4 4 3 4 4 4 16] -> {2x, 2A}; deck:[3 2 4 4 4 3 4 4 4 16]

    ---Compute 2A, then go to left-most 2x to compute it's conditional expectations---
    {2x, 2A}; deck[3 2 4 4 4 3 4 4 4 16] -> {2A, 2A}; deck:[2 2 4 4 4 3 4 4 4 16]

    ---Snip---

    What should be apparent here is that the given deck subset is different for each given pair hand after split; even when the overall substance for each hand is similar. The Expectations for the right most 2A is:

    2A v 6
    deck:[4 3 4 4 4 4 4 4 4 16]:: *we have removed the left-most deuce from the deck*
    Stand: -9.587
    Hit: 17.82
    Double: 26.25

    The Expectation for the left-most 2A is:

    2A v 6
    deck[3 3 4 4 4 4 4 4 4 16]:: *we removed the right-most cards [2A] from the deck*
    Stand: -6.556
    Hit: 19.22
    Double: 30.24


    While our overall strategy does not change (that is the given decision is to double/draw for DAS/nDAS,) our overall expectation would be different rather than taking the product of the split hand with it's pair card removed and timing it by 2.

    I would be interested in seeing how MGP and Calc both came up with their exact/optimal split algorithm. Why is it that for SPL1 that we can do EV = 2*EV(x) ?

    Hopefully this helps a little. Or not...maybe I got too carried away! :/

  13. #13


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No
    I suppose at this point we should acknowledge to the OP that we've moved away from the original question that started this thread. (Although if it helps, we are indeed still talking about MGP's CA, not k_c's.)

    Quote Originally Posted by dogman_1234 View Post
    ---SPLIT 22 v 6---
    [22] -> {2x, 2x}; deck:[4 2 4 4 4 3 4 4 4 16]

    ---Remove 2 and draw first rank---
    {2x, 2x}; deck[4 2 4 4 4 3 4 4 4 16] -> {2x, 2A}; deck:[3 2 4 4 4 3 4 4 4 16]

    ---Compute 2A, then go to left-most 2x to compute it's conditional expectations---
    {2x, 2A}; deck[3 2 4 4 4 3 4 4 4 16] -> {2A, 2A}; deck:[2 2 4 4 4 3 4 4 4 16]

    ---Snip---

    What should be apparent here is that the given deck subset is different for each given pair hand after split; even when the overall substance for each hand is similar. The Expectations for the right most 2A is:

    2A v 6
    deck:[4 3 4 4 4 4 4 4 4 16]:: *we have removed the left-most deuce from the deck*
    Stand: -9.587
    Hit: 17.82
    Double: 26.25

    The Expectation for the left-most 2A is:

    2A v 6
    deck[3 3 4 4 4 4 4 4 4 16]:: *we removed the right-most cards [2A] from the deck*
    Stand: -6.556
    Hit: 19.22
    Double: 30.24


    While our overall strategy does not change (that is the given decision is to double/draw for DAS/nDAS,) our overall expectation would be different rather than taking the product of the split hand with it's pair card removed and timing it by 2.
    But it's not different; the above is more work than we need to compute the expected value of splitting without resplitting. Let's use your example of splitting 2-2 vs. dealer 6, in single deck with S17 SPL1, and let's assume nDAS to simplify the "brute force" calculations. We are assuming CDZ- playing strategy, which in this case is to hit any hand drawn to the split.

    First, hopefully we can agree that the overall CDZ- expected value of splitting 2-2 vs. 6 is 0.1189818683947885 (as a fraction of initial wager). This can be confirmed by any of the accessible CA's (e.g., mine, MGP's, or k_c's).

    We can compute this value as 2E[X;1], where E[X;1] is the expected value of:

    1. Starting with the full single deck, removing the dealer's up card, and two pair cards.
    2. Randomly draw a card to yield a split hand, e.g., drawing an ace yields the hand 2-A.
    3. Play out that single "half" of the split and note the outcome.

    The random draw in steps 2 and 3 means that we must evaluate each possible card drawn to the single half of the split:

    Code:
    P(draw 1) = 0.081632653061224483
        E(hit) = 0.1782246889194101
    P(draw 2) = 0.040816326530612242
        E(hit) = 0.046675159884156783
    P(draw 3) = 0.081632653061224483
        E(hit) = 0.033124919547275714
    P(draw 4) = 0.081632653061224483
        E(hit) = 0.02672233027248045
    P(draw 5) = 0.081632653061224483
        E(hit) = 0.082372375465304196
    P(draw 6) = 0.061224489795918366
        E(hit) = 0.1387543650852183
    P(draw 7) = 0.081632653061224483
        E(hit) = 0.21256816781977234
    P(draw 8) = 0.081632653061224483
        E(hit) = 0.32250214058632209
    P(draw 9) = 0.081632653061224483
        E(hit) = 0.36250247649994238
    P(draw 10) = 0.32653061224489793
        E(hit) = -0.15416412723710496
    Weighted sum     = 0.059490934197394249
    Overall E(split) = 0.1189818683947885
    It's important to note that this isn't just computational convenience. That is, it's not that we simply "get the same answer" by doing the calculation this way. The expected outcome of the two halves of the split are indeed identical.

    And even for resplitting, we can similarly take advantage of that same linearity of expectation by "grouping" the various possible split/resplit outcomes according to the "pattern" of number of pair-cards and non-pair-cards drawn to the split hands (weighted by the number of ways that each such pattern can occur). For example, consider SPL3: among those outcomes where we only split 2-2 once (i.e., we draw a non-deuce to both halves of the split), let X be the outcome of the first half of such a split, and Y be the outcome of the second half of such a split. Then E[X]=E[Y]. See this paper for more details on how we can use this to efficiently (and still exactly) compute split EVs. (This is how my CA does it, for example.)

    Eric

    P.S. Following is the example code using my CA to illustrate how we can compute the values in the above example:

    Code:
    #include "blackjack.h"
    #include <iostream>
    #include <iomanip>
    
    int main()
    {
        std::cout << std::setprecision(17);
    
        // Assume SD, S17, nDAS, SPL1.
        BJShoe shoe(1);
        BJRules rules(false, true, true, true, false, false, false, false, false);
        BJStrategy cdz;
        BJProgress progress;
        BJPlayer *basic = new BJPlayer(shoe, rules, cdz, progress);
    
        // Evaluate split 2-2 vs. 6 by considering each possible single drawn card.
        int pair_card = 2, up_card = 6;
        double ev_split = 0;
        BJHand hand;
        hand.deal(pair_card);
        shoe.deal(pair_card);
        BJPlayer *split = new BJPlayer(shoe, rules, cdz, progress);
        shoe.deal(pair_card);
        shoe.deal(up_card);
        for (int draw = 1; draw <= 10; ++draw)
        {
            hand.deal(draw);
            double p = shoe.getProbability(draw);
            int strategy = basic->getOption(hand, up_card, true, false, false);
            double ev_draw = (strategy == BJ_STAND ?
                    split->getValueStand(hand, up_card) :
                    split->getValueHit(hand, up_card));
            ev_split += p * ev_draw;
            std::cout << "P(draw " << draw << ") = " << p << std::endl;
            std::cout << "    E(" << (strategy == BJ_STAND ? "stand" : "hit") <<
                ") = " << ev_draw << std::endl;
            hand.undeal(draw);
        }
        std::cout << "Weighted sum     = " << ev_split << std::endl;
        std::cout << "Overall E(split) = " << 2 * ev_split << std::endl;
        delete basic;
        delete split;
    }

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

About Blackjack: The Forum

BJTF is an advantage player site based on the principles of comity. That is, civil and considerate behavior for the mutual benefit of all involved. The goal of advantage play is the legal extraction of funds from gaming establishments by gaining a mathematic advantage and developing the skills required to use that advantage. To maximize our success, it is important to understand that we are all on the same side. Personal conflicts simply get in the way of our goals.