See the top rated post in this thread. Click here

Page 2 of 3 FirstFirst 123 LastLast
Results 14 to 26 of 28

Thread: MGP's BJCA

  1. #14


    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;
    }

  2. #15


    Did you find this post helpful? Yes | No
    Quote Originally Posted by ericfarmer View Post
    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).
    Both BJA3 and bjstrat (KC) give 0.1259. What am I missing??

    Don

  3. #16


    Did you find this post helpful? Yes | No
    Quote Originally Posted by DSchles View Post
    Both BJA3 and bjstrat (KC) give 0.1259. What am I missing??

    Don
    Don,

    I believe ericfarmer is using k_c's program with the "Compute mode" set to "Basic strat" rather than the default setting of "Best strat".

    Hope this helps!

    Dog Hand

  4. #17


    Did you find this post helpful? Yes | No
    What you are missing is that Eric is using CDZ- as strategy for split hands. CDZ- means strategy for split hands is determined prior to splitting by duplicating the strategy of non-split hands. My program has this option for a full shoe whereas Eric's can use this strategy for any shoe composition. In order to choose this option for a full shoe in my program you need to select 'Basic strat' under 'Compute mode' and 'Pre-split' under 'Depleted shoe split strat'. My program uses this as an option to compute basic strategy EVs for a depleted shoe. The default of my program is to use the optimal strategy of the first split hand and for a full shoe split EV for 2-2 v 6 s17 nDAS is more optimal using this strategy instead of using the strategy determined by pre-spilt hands.

    It might sound complicated but it's simply a difference in the fixed strategy that is used for splitting.

    k_c

  5. #18


    Did you find this post helpful? Yes | No
    Thanks. Understood. Never used that mode, nor was it used in BJA3, as the results are suboptimal.

    Don

  6. #19


    Did you find this post helpful? Yes | No
    Quote Originally Posted by ericfarmer View Post
    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.

    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
    Okay, so:

    1.) From what I am gathering here is that the method of computing exact split Expectation's for single-split hands is 2 times the overall weighted Expectations for each new hand drawn, conditioned on a pair card removed. That is, even when computing the overall split Expectation for 22 vs 6, we only need to be aware of one single hand conditioned on its pair-rank removed from a full deck. We don't need to be cognizant of the other card nor of the other hand's make-up. So, for splitting 22 vs 6 , we don't need to evaluate {2A, 2A} directly; taking into account the missing deuce and Ace in the second hand for the Expectation of the first. We simply need to do {2x, 2A} and add the new Expectation of 2A conditioned on the missing 2 pair-rank removed to properly find the correct E/Action for 2A. Summing for each new draw rank 1-10, we combine them (by their overall weighted Expectations as E[Split] = P(A) * E(A) + ...P(10) * E(10)) taking a factor of two (for the two hands) and we should properly derive the conditional expectation of splitting 22 vs 6 for 1D, S17, (n)DAS, SPL1.

    2.) Further splitting gets more complicated as we most of the time hit a "wall" of non-pair ranks. So, to split 22 vs 6 for SP2: we can have {2x, 2x}, draw a 2 and develop {2x, 2x, 2x}, we then cycle through each rank x, from 1-10, for the right-most 2x, and times it by the number of ways that hand state can be ordered. But, from your paper, this is (not?) the way this is done. I would assume the multinomial coefficient of the given split rank values to determine the overall Expectation of splitting 22 v 6 for SP2. Assume we draw an Ace after splitting to 3 deuces, we have a MC of 4. We then take this MC and times it by the overall weighted expectation for each optimal action (similar to our SP1 example.) However; drawing a third deuce is not guaranteed and so this method is wrong, correct? As per your paper, what I just described is incorrect and there involves some level of detail that I am missing.
    Last edited by lij45o6; 06-16-2019 at 06:18 PM.

  7. #20


    Did you find this post helpful? Yes | No
    Quote Originally Posted by DSchles View Post
    Thanks. Understood. Never used that mode, nor was it used in BJA3, as the results are suboptimal.

    Don
    They aren't suboptimal, they simply make a different assumption about the allowed expressive power in specifying the player's strategy. CDZ- is in fact *more* optimal than the strategy assumed by Cacarulo in BJA3 in that composition-dependence doesn't stop at three cards, so to speak. And CDP1 (roughly what is assumed in BJA3, at least the part relevant to pair splitting) is also less optimal than, say, CDP (also evaluated at least by MGP's and my CAs), where the player can not only consider essentially *whether* he has split a given pair in modifying his strategy, but also *how many times*.

    At any rate, for the purpose of this particular issue raised by dogman_1234, the distinction between CDZ- and CDP1 doesn't matter; the same assertion holds, namely, that the expected value of the two halves of the split are identical.

  8. #21


    Did you find this post helpful? Yes | No
    Quote Originally Posted by dogman_1234 View Post
    Okay, so:

    1.) From what I am gathering here is that the method of computing exact split Expectation's for single-split hands is 2 times the overall weighted Expectations for each new hand drawn, conditioned on a pair card removed. That is, even when computing the overall split Expectation for 22 vs 6, we only need to be aware of one single hand conditioned on its pair-rank removed from a full deck. We don't need to be cognizant of the other card nor of the other hand's make-up. So, for splitting 22 vs 6 , we don't need to evaluate {2A, 2A} directly; taking into account the missing deuce and Ace in the second hand for the Expectation of the first. We simply need to do {2x, 2A} and add the new Expectation of 2A conditioned on the missing 2 pair-rank removed to properly find the correct E/Action for 2A. Summing for each new draw rank 1-10, we combine them (by their overall weighted Expectations as E[Split] = P(A) * E(A) + ...P(10) * E(10)) taking a factor of two (for the two hands) and we should properly derive the conditional expectation of splitting 22 vs 6 for 1D, S17, (n)DAS, SPL1.
    Correct.

    Quote Originally Posted by dogman_1234 View Post
    2.) Further splitting gets more complicated as we most of the time hit a "wall" of non-pair ranks. So, to split 22 vs 6 for SP2: we can have {2x, 2x}, draw a 2 and develop {2x, 2x, 2x}, we then cycle through each rank x, from 1-10, for the right-most 2x, and times it by the number of ways that hand state can be ordered. But, from your paper, this is (not?) the way this is done. I would assume the multinomial coefficient of the given split rank values to determine the overall Expectation of splitting 22 v 6 for SP2. Assume we draw an Ace after splitting to 3 deuces, we have a MC of 4. We then take this MC and times it by the overall weighted expectation for each optimal action (similar to our SP1 example.) However; drawing a third deuce is not guaranteed and so this method is wrong, correct? As per your paper, what I just described is incorrect and there involves some level of detail that I am missing.
    I'm not sure I understand the multinomial coefficient in your description, you may need to help me out with some more explicit detail here. I *think* the issue you're describing is that, although we can indeed split, and draw another deuce and re-split to the maximum of three hands (for SPL2), there are really two different sub-cases we need to consider: do we draw that third deuce immediately, so that even if we draw additional deuces to the resulting three split hands, we are already prohibited from re-splitting again? Or do we draw a non-deuce (with a correspondingly differently-conditioned EV calcluation for that split hand) first, and *then* draw the third deuce, so that only the last two split hands are "already prohibited" from re-splitting?

    The relevant section of the paper that describes this situation and the resulting formula is here: "The second possibility is that the player splits the maximum number of hands, but completes (i.e., draws non-pair cards to) k of them (where 0 ? k ? n ? 2) before drawing additional pair cards to reach the maximum number of hands. The probability in this case is given by..."

  9. #22


    Did you find this post helpful? Yes | No
    Quote Originally Posted by ericfarmer View Post
    I'm not sure I understand the multinomial coefficient in your description, you may need to help me out with some more explicit detail here. I *think* the issue you're describing is that, although we can indeed split, and draw another deuce and re-split to the maximum of three hands (for SPL2), there are really two different sub-cases we need to consider: do we draw that third deuce immediately, so that even if we draw additional deuces to the resulting three split hands, we are already prohibited from re-splitting again? Or do we draw a non-deuce (with a correspondingly differently-conditioned EV calcluation for that split hand) first, and *then* draw the third deuce, so that only the last two split hands are "already prohibited" from re-splitting?

    The relevant section of the paper that describes this situation and the resulting formula is here: "The second possibility is that the player splits the maximum number of hands, but completes (i.e., draws non-pair cards to) k of them (where 0 ? k ? n ? 2) before drawing additional pair cards to reach the maximum number of hands. The probability in this case is given by..."
    I was assuming that we could compute 22 v 6 for SP2 using the single card removal method for SP1 by way of taking into account the removal of the 2 extra deuces and finding the overall weighted Expectation of splitting. Rather than one deuce removed, we remove two deuces and compute how many ways that split hand can be made up (hence, using the MC of the given hand state.) Since, there are 4 cards we are drawing to (3 deuces and an x), we compute the MC as 4!/(3! * 1!) = 4.

    However; you raised an interesting (and correct) point: what do we do when we draw a third deuce on the second hand after drawing to the first. Lets say we split out hand {Px, Px}, and draw N for both: {PN, PN}. We are done here. But! What happend when we draw another P for either hand: {Px, PP} or {PP, PN}? Simply evaluating a SP2 hand using the SP1 method here is incorrect, as the number of ways a hand can be drawn is determined by which way the cards are drawn. (AKA, well no shit dogman.)

  10. #23


    Did you find this post helpful? Yes | No
    Quote Originally Posted by ericfarmer View Post
    They aren't suboptimal, they simply make a different assumption about the allowed expressive power in specifying the player's strategy. CDZ- is in fact *more* optimal than the strategy assumed by Cacarulo in BJA3 in that composition-dependence doesn't stop at three cards, so to speak. And CDP1 (roughly what is assumed in BJA3, at least the part relevant to pair splitting) is also less optimal than, say, CDP (also evaluated at least by MGP's and my CAs), where the player can not only consider essentially *whether* he has split a given pair in modifying his strategy, but also *how many times*.

    At any rate, for the purpose of this particular issue raised by dogman_1234, the distinction between CDZ- and CDP1 doesn't matter; the same assertion holds, namely, that the expected value of the two halves of the split are identical.
    ericfarmer,

    Would you post a primer defining all the different split methods: CDZ-, CDP, etc.? I find myself getting lost in the terminology.

    Thanks in advance!

    Dog Hand

  11. #24


    Did you find this post helpful? Yes | No
    Quote Originally Posted by Dog Hand View Post
    ericfarmer,

    Would you post a primer defining all the different split methods: CDZ-, CDP, etc.? I find myself getting lost in the terminology.

    Thanks in advance!

    Dog Hand
    You might also want to reread BJA3, pp. 387-393, to see how Cacarulo and I decided to handle the subject.

    Don

  12. #25


    Did you find this post helpful? Yes | No
    Quote Originally Posted by DSchles View Post
    You might also want to reread BJA3, pp. 387-393, to see how Cacarulo and I decided to handle the subject.

    Don
    Trying to sell more books?

  13. #26


    Did you find this post helpful? Yes | No
    Quote Originally Posted by BoSox View Post
    Trying to sell more books?
    Obviously!

Page 2 of 3 FirstFirst 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.