Expected value of a card game with 6 cards












4














A deck contains 3 cards with +1 value and 3 cards with -1 value. The dealer shuffles the cards and deals them face up one by one. After each card is dealt, you have the option of stopping the game. Once the game is stopped, you get paid according to the total value of the cards that were dealt. E.g. if you stop the game after +1, +1, +1, you get +3. What is the expected value of the optimal strategy for this game.



My stab at it:



Since the net sum of the cards is zero, you will never lose any points on each round. If your trailing score is negative, you can keep drawing to get to at least flat.



Strategy: Draw until you get a cumulative score of +1 and stop.



Since there are a total of 20 permutations 6!/(3!*3!) of this game, only 5 sequences will give you a trailing score of 0 or below. So the expected value of this strategy: .75*1 + .25*0 = .75



Strategy 2: Draw two cards, if you have a cumulative score that is greater than 1, stop. Otherwise draw until you get a score of 1 and stop.



I was unable to figure out how to do the math for this strategy, but I did simulate it and apparently it has an expected value of .85. Can someone walk me through the math of the second strategy? If the second strategy is not the optimal one, what is a better strategy?










share|cite|improve this question
























  • Why not "draw until less than half the unknown cards" are "+1"? That is , draw until the expected return on the next card is negative.
    – Eric Towers
    Nov 24 at 1:15










  • that's strategy 1: Draw until you get +1 and stop.
    – tiger88
    Nov 24 at 1:16










  • No. The sequence "-1, +1, +1, stop" satisfies my strategy, but is not "stop after the first +1".
    – Eric Towers
    Nov 24 at 1:18










  • I'm sorry, i meant draw until you get a cumulative score of +1
    – tiger88
    Nov 24 at 1:20
















4














A deck contains 3 cards with +1 value and 3 cards with -1 value. The dealer shuffles the cards and deals them face up one by one. After each card is dealt, you have the option of stopping the game. Once the game is stopped, you get paid according to the total value of the cards that were dealt. E.g. if you stop the game after +1, +1, +1, you get +3. What is the expected value of the optimal strategy for this game.



My stab at it:



Since the net sum of the cards is zero, you will never lose any points on each round. If your trailing score is negative, you can keep drawing to get to at least flat.



Strategy: Draw until you get a cumulative score of +1 and stop.



Since there are a total of 20 permutations 6!/(3!*3!) of this game, only 5 sequences will give you a trailing score of 0 or below. So the expected value of this strategy: .75*1 + .25*0 = .75



Strategy 2: Draw two cards, if you have a cumulative score that is greater than 1, stop. Otherwise draw until you get a score of 1 and stop.



I was unable to figure out how to do the math for this strategy, but I did simulate it and apparently it has an expected value of .85. Can someone walk me through the math of the second strategy? If the second strategy is not the optimal one, what is a better strategy?










share|cite|improve this question
























  • Why not "draw until less than half the unknown cards" are "+1"? That is , draw until the expected return on the next card is negative.
    – Eric Towers
    Nov 24 at 1:15










  • that's strategy 1: Draw until you get +1 and stop.
    – tiger88
    Nov 24 at 1:16










  • No. The sequence "-1, +1, +1, stop" satisfies my strategy, but is not "stop after the first +1".
    – Eric Towers
    Nov 24 at 1:18










  • I'm sorry, i meant draw until you get a cumulative score of +1
    – tiger88
    Nov 24 at 1:20














4












4








4


1





A deck contains 3 cards with +1 value and 3 cards with -1 value. The dealer shuffles the cards and deals them face up one by one. After each card is dealt, you have the option of stopping the game. Once the game is stopped, you get paid according to the total value of the cards that were dealt. E.g. if you stop the game after +1, +1, +1, you get +3. What is the expected value of the optimal strategy for this game.



My stab at it:



Since the net sum of the cards is zero, you will never lose any points on each round. If your trailing score is negative, you can keep drawing to get to at least flat.



Strategy: Draw until you get a cumulative score of +1 and stop.



Since there are a total of 20 permutations 6!/(3!*3!) of this game, only 5 sequences will give you a trailing score of 0 or below. So the expected value of this strategy: .75*1 + .25*0 = .75



Strategy 2: Draw two cards, if you have a cumulative score that is greater than 1, stop. Otherwise draw until you get a score of 1 and stop.



I was unable to figure out how to do the math for this strategy, but I did simulate it and apparently it has an expected value of .85. Can someone walk me through the math of the second strategy? If the second strategy is not the optimal one, what is a better strategy?










share|cite|improve this question















A deck contains 3 cards with +1 value and 3 cards with -1 value. The dealer shuffles the cards and deals them face up one by one. After each card is dealt, you have the option of stopping the game. Once the game is stopped, you get paid according to the total value of the cards that were dealt. E.g. if you stop the game after +1, +1, +1, you get +3. What is the expected value of the optimal strategy for this game.



My stab at it:



Since the net sum of the cards is zero, you will never lose any points on each round. If your trailing score is negative, you can keep drawing to get to at least flat.



Strategy: Draw until you get a cumulative score of +1 and stop.



Since there are a total of 20 permutations 6!/(3!*3!) of this game, only 5 sequences will give you a trailing score of 0 or below. So the expected value of this strategy: .75*1 + .25*0 = .75



Strategy 2: Draw two cards, if you have a cumulative score that is greater than 1, stop. Otherwise draw until you get a score of 1 and stop.



I was unable to figure out how to do the math for this strategy, but I did simulate it and apparently it has an expected value of .85. Can someone walk me through the math of the second strategy? If the second strategy is not the optimal one, what is a better strategy?







probability optimization game-theory card-games






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 24 at 1:21

























asked Nov 24 at 1:03









tiger88

235




235












  • Why not "draw until less than half the unknown cards" are "+1"? That is , draw until the expected return on the next card is negative.
    – Eric Towers
    Nov 24 at 1:15










  • that's strategy 1: Draw until you get +1 and stop.
    – tiger88
    Nov 24 at 1:16










  • No. The sequence "-1, +1, +1, stop" satisfies my strategy, but is not "stop after the first +1".
    – Eric Towers
    Nov 24 at 1:18










  • I'm sorry, i meant draw until you get a cumulative score of +1
    – tiger88
    Nov 24 at 1:20


















  • Why not "draw until less than half the unknown cards" are "+1"? That is , draw until the expected return on the next card is negative.
    – Eric Towers
    Nov 24 at 1:15










  • that's strategy 1: Draw until you get +1 and stop.
    – tiger88
    Nov 24 at 1:16










  • No. The sequence "-1, +1, +1, stop" satisfies my strategy, but is not "stop after the first +1".
    – Eric Towers
    Nov 24 at 1:18










  • I'm sorry, i meant draw until you get a cumulative score of +1
    – tiger88
    Nov 24 at 1:20
















Why not "draw until less than half the unknown cards" are "+1"? That is , draw until the expected return on the next card is negative.
– Eric Towers
Nov 24 at 1:15




Why not "draw until less than half the unknown cards" are "+1"? That is , draw until the expected return on the next card is negative.
– Eric Towers
Nov 24 at 1:15












that's strategy 1: Draw until you get +1 and stop.
– tiger88
Nov 24 at 1:16




that's strategy 1: Draw until you get +1 and stop.
– tiger88
Nov 24 at 1:16












No. The sequence "-1, +1, +1, stop" satisfies my strategy, but is not "stop after the first +1".
– Eric Towers
Nov 24 at 1:18




No. The sequence "-1, +1, +1, stop" satisfies my strategy, but is not "stop after the first +1".
– Eric Towers
Nov 24 at 1:18












I'm sorry, i meant draw until you get a cumulative score of +1
– tiger88
Nov 24 at 1:20




I'm sorry, i meant draw until you get a cumulative score of +1
– tiger88
Nov 24 at 1:20










1 Answer
1






active

oldest

votes


















2














You can directly compute the optimal strategy and its expected value with a dynamic program (backward induction).



Consider the possible states of the game, which can be completely described by the (number of -1 cards remaining, number of +1 cards remaining), with 16 possibilities.



Arrange them in a square grid as follows (it might be better on paper if you make it a diamond with (3,3) on the left and (0,0) on the right)



$$begin{array}{ccccccc}
stackrel{(0)}{(3,3)} & rightarrow & stackrel{(1)}{(3,2)} & rightarrow & stackrel{(2)}{(3,1)} & rightarrow & stackrel{(3)}{(3,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-1)}{(2,3)} & rightarrow & stackrel{(0)}{(2,2)} & rightarrow & stackrel{(1)}{(2,1)} & rightarrow & stackrel{(2)}{(2,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-2)}{(1,3)} & rightarrow & stackrel{(-1)}{(1,2)} & rightarrow & stackrel{(0)}{(1,1)} & rightarrow & stackrel{(1)}{(1,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-3)}{(0,3)} & rightarrow & stackrel{(-2)}{(0,2)} & rightarrow & stackrel{(-1)}{(0,1)} & rightarrow & stackrel{(0)}{(0,0)}\
end{array}
$$

The entries are on top (score if you stop here), bottom (#-1, #+1) remaining in the deck.



The trick is to work backwards from the (0,0) corner and decide at each state whether you want to continue or not. Examples:




  • There is no decision at (0,0), it is worth 0.

  • At (0,1) the choice is between taking -1, or drawing a card which gets 0. Since drawing is better, we now know (0,1) is also worth 0.

  • At (1,0) we take 1 instead of drawing which gets 0.

  • At (1,1) a real decision comes up. Stopping is worth 0. Drawing gets you 1/2 chance to move to (1,0) [worth 1] and 1/2 chance to move to (0,1) [worth 0]. So drawing is worth 1/2 on average, and it is optimal to do so.


You can continue filling in all the states to find the optimal strategy. Note that unequal card counts matter: at say (1,2), drawing gives you 1/3 chance to move to (0,2) and 2/3 chance to move to (1,1).



The filled in square looks like:
$$begin{array}{ccccccc}
stackrel{17/20}{(3,3)} & rightarrow & stackrel{6/5}{(3,2)} & rightarrow & stackrel{mathbf{2}}{(3,1)} & & stackrel{mathbf{3}}{(3,0)}\
downarrow && downarrow && &&\
stackrel{1/2}{(2,3)} & rightarrow & stackrel{2/3}{(2,2)} & rightarrow & stackrel{mathbf{1}}{(2,1)} & rightarrow^{?} & stackrel{mathbf{2}}{(2,0)}\
downarrow && downarrow && downarrow^{?} &&\
stackrel{1/4}{(1,3)} & rightarrow & stackrel{1/3}{(1,2)} & rightarrow & stackrel{1/2}{(1,1)} & rightarrow & stackrel{mathbf{1}}{(1,0)}\
downarrow && downarrow && downarrow &&\
stackrel{0}{(0,3)} & rightarrow & stackrel{0}{(0,2)} & rightarrow & stackrel{0}{(0,1)} & rightarrow & stackrel{mathbf{0}}{(0,0)}\
end{array}$$



States where you stop have their value bolded. At (2,1) it doesn't matter if you draw or stop.



Since you have made value-maximizing choices at every step including the effects of later choices, Strategy 2 is proven optimal, with value exactly 17/20.






share|cite|improve this answer























  • I think you switched the order of the cards? (number of -1 cards, number of +1 cards) But this is an excellent answer thanks!
    – tiger88
    Nov 24 at 1:56












  • Thanks, fixed it
    – obscurans
    Nov 24 at 1:57










  • is this trick just something youll find in a generic game theory book?
    – Tim kinsella
    Nov 24 at 2:00








  • 2




    In game theory, this technique is known as backward induction. It will work for any finite game (no possibility of cycling back to the same game state), although the number of states could be immense (say chess with threefold repetition).
    – obscurans
    Nov 24 at 2:04












  • From looking at your end states in the second diagram, what is the syntax to determine the optimal strategy?
    – tiger88
    Nov 24 at 2:52











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3011047%2fexpected-value-of-a-card-game-with-6-cards%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














You can directly compute the optimal strategy and its expected value with a dynamic program (backward induction).



Consider the possible states of the game, which can be completely described by the (number of -1 cards remaining, number of +1 cards remaining), with 16 possibilities.



Arrange them in a square grid as follows (it might be better on paper if you make it a diamond with (3,3) on the left and (0,0) on the right)



$$begin{array}{ccccccc}
stackrel{(0)}{(3,3)} & rightarrow & stackrel{(1)}{(3,2)} & rightarrow & stackrel{(2)}{(3,1)} & rightarrow & stackrel{(3)}{(3,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-1)}{(2,3)} & rightarrow & stackrel{(0)}{(2,2)} & rightarrow & stackrel{(1)}{(2,1)} & rightarrow & stackrel{(2)}{(2,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-2)}{(1,3)} & rightarrow & stackrel{(-1)}{(1,2)} & rightarrow & stackrel{(0)}{(1,1)} & rightarrow & stackrel{(1)}{(1,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-3)}{(0,3)} & rightarrow & stackrel{(-2)}{(0,2)} & rightarrow & stackrel{(-1)}{(0,1)} & rightarrow & stackrel{(0)}{(0,0)}\
end{array}
$$

The entries are on top (score if you stop here), bottom (#-1, #+1) remaining in the deck.



The trick is to work backwards from the (0,0) corner and decide at each state whether you want to continue or not. Examples:




  • There is no decision at (0,0), it is worth 0.

  • At (0,1) the choice is between taking -1, or drawing a card which gets 0. Since drawing is better, we now know (0,1) is also worth 0.

  • At (1,0) we take 1 instead of drawing which gets 0.

  • At (1,1) a real decision comes up. Stopping is worth 0. Drawing gets you 1/2 chance to move to (1,0) [worth 1] and 1/2 chance to move to (0,1) [worth 0]. So drawing is worth 1/2 on average, and it is optimal to do so.


You can continue filling in all the states to find the optimal strategy. Note that unequal card counts matter: at say (1,2), drawing gives you 1/3 chance to move to (0,2) and 2/3 chance to move to (1,1).



The filled in square looks like:
$$begin{array}{ccccccc}
stackrel{17/20}{(3,3)} & rightarrow & stackrel{6/5}{(3,2)} & rightarrow & stackrel{mathbf{2}}{(3,1)} & & stackrel{mathbf{3}}{(3,0)}\
downarrow && downarrow && &&\
stackrel{1/2}{(2,3)} & rightarrow & stackrel{2/3}{(2,2)} & rightarrow & stackrel{mathbf{1}}{(2,1)} & rightarrow^{?} & stackrel{mathbf{2}}{(2,0)}\
downarrow && downarrow && downarrow^{?} &&\
stackrel{1/4}{(1,3)} & rightarrow & stackrel{1/3}{(1,2)} & rightarrow & stackrel{1/2}{(1,1)} & rightarrow & stackrel{mathbf{1}}{(1,0)}\
downarrow && downarrow && downarrow &&\
stackrel{0}{(0,3)} & rightarrow & stackrel{0}{(0,2)} & rightarrow & stackrel{0}{(0,1)} & rightarrow & stackrel{mathbf{0}}{(0,0)}\
end{array}$$



States where you stop have their value bolded. At (2,1) it doesn't matter if you draw or stop.



Since you have made value-maximizing choices at every step including the effects of later choices, Strategy 2 is proven optimal, with value exactly 17/20.






share|cite|improve this answer























  • I think you switched the order of the cards? (number of -1 cards, number of +1 cards) But this is an excellent answer thanks!
    – tiger88
    Nov 24 at 1:56












  • Thanks, fixed it
    – obscurans
    Nov 24 at 1:57










  • is this trick just something youll find in a generic game theory book?
    – Tim kinsella
    Nov 24 at 2:00








  • 2




    In game theory, this technique is known as backward induction. It will work for any finite game (no possibility of cycling back to the same game state), although the number of states could be immense (say chess with threefold repetition).
    – obscurans
    Nov 24 at 2:04












  • From looking at your end states in the second diagram, what is the syntax to determine the optimal strategy?
    – tiger88
    Nov 24 at 2:52
















2














You can directly compute the optimal strategy and its expected value with a dynamic program (backward induction).



Consider the possible states of the game, which can be completely described by the (number of -1 cards remaining, number of +1 cards remaining), with 16 possibilities.



Arrange them in a square grid as follows (it might be better on paper if you make it a diamond with (3,3) on the left and (0,0) on the right)



$$begin{array}{ccccccc}
stackrel{(0)}{(3,3)} & rightarrow & stackrel{(1)}{(3,2)} & rightarrow & stackrel{(2)}{(3,1)} & rightarrow & stackrel{(3)}{(3,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-1)}{(2,3)} & rightarrow & stackrel{(0)}{(2,2)} & rightarrow & stackrel{(1)}{(2,1)} & rightarrow & stackrel{(2)}{(2,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-2)}{(1,3)} & rightarrow & stackrel{(-1)}{(1,2)} & rightarrow & stackrel{(0)}{(1,1)} & rightarrow & stackrel{(1)}{(1,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-3)}{(0,3)} & rightarrow & stackrel{(-2)}{(0,2)} & rightarrow & stackrel{(-1)}{(0,1)} & rightarrow & stackrel{(0)}{(0,0)}\
end{array}
$$

The entries are on top (score if you stop here), bottom (#-1, #+1) remaining in the deck.



The trick is to work backwards from the (0,0) corner and decide at each state whether you want to continue or not. Examples:




  • There is no decision at (0,0), it is worth 0.

  • At (0,1) the choice is between taking -1, or drawing a card which gets 0. Since drawing is better, we now know (0,1) is also worth 0.

  • At (1,0) we take 1 instead of drawing which gets 0.

  • At (1,1) a real decision comes up. Stopping is worth 0. Drawing gets you 1/2 chance to move to (1,0) [worth 1] and 1/2 chance to move to (0,1) [worth 0]. So drawing is worth 1/2 on average, and it is optimal to do so.


You can continue filling in all the states to find the optimal strategy. Note that unequal card counts matter: at say (1,2), drawing gives you 1/3 chance to move to (0,2) and 2/3 chance to move to (1,1).



The filled in square looks like:
$$begin{array}{ccccccc}
stackrel{17/20}{(3,3)} & rightarrow & stackrel{6/5}{(3,2)} & rightarrow & stackrel{mathbf{2}}{(3,1)} & & stackrel{mathbf{3}}{(3,0)}\
downarrow && downarrow && &&\
stackrel{1/2}{(2,3)} & rightarrow & stackrel{2/3}{(2,2)} & rightarrow & stackrel{mathbf{1}}{(2,1)} & rightarrow^{?} & stackrel{mathbf{2}}{(2,0)}\
downarrow && downarrow && downarrow^{?} &&\
stackrel{1/4}{(1,3)} & rightarrow & stackrel{1/3}{(1,2)} & rightarrow & stackrel{1/2}{(1,1)} & rightarrow & stackrel{mathbf{1}}{(1,0)}\
downarrow && downarrow && downarrow &&\
stackrel{0}{(0,3)} & rightarrow & stackrel{0}{(0,2)} & rightarrow & stackrel{0}{(0,1)} & rightarrow & stackrel{mathbf{0}}{(0,0)}\
end{array}$$



States where you stop have their value bolded. At (2,1) it doesn't matter if you draw or stop.



Since you have made value-maximizing choices at every step including the effects of later choices, Strategy 2 is proven optimal, with value exactly 17/20.






share|cite|improve this answer























  • I think you switched the order of the cards? (number of -1 cards, number of +1 cards) But this is an excellent answer thanks!
    – tiger88
    Nov 24 at 1:56












  • Thanks, fixed it
    – obscurans
    Nov 24 at 1:57










  • is this trick just something youll find in a generic game theory book?
    – Tim kinsella
    Nov 24 at 2:00








  • 2




    In game theory, this technique is known as backward induction. It will work for any finite game (no possibility of cycling back to the same game state), although the number of states could be immense (say chess with threefold repetition).
    – obscurans
    Nov 24 at 2:04












  • From looking at your end states in the second diagram, what is the syntax to determine the optimal strategy?
    – tiger88
    Nov 24 at 2:52














2












2








2






You can directly compute the optimal strategy and its expected value with a dynamic program (backward induction).



Consider the possible states of the game, which can be completely described by the (number of -1 cards remaining, number of +1 cards remaining), with 16 possibilities.



Arrange them in a square grid as follows (it might be better on paper if you make it a diamond with (3,3) on the left and (0,0) on the right)



$$begin{array}{ccccccc}
stackrel{(0)}{(3,3)} & rightarrow & stackrel{(1)}{(3,2)} & rightarrow & stackrel{(2)}{(3,1)} & rightarrow & stackrel{(3)}{(3,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-1)}{(2,3)} & rightarrow & stackrel{(0)}{(2,2)} & rightarrow & stackrel{(1)}{(2,1)} & rightarrow & stackrel{(2)}{(2,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-2)}{(1,3)} & rightarrow & stackrel{(-1)}{(1,2)} & rightarrow & stackrel{(0)}{(1,1)} & rightarrow & stackrel{(1)}{(1,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-3)}{(0,3)} & rightarrow & stackrel{(-2)}{(0,2)} & rightarrow & stackrel{(-1)}{(0,1)} & rightarrow & stackrel{(0)}{(0,0)}\
end{array}
$$

The entries are on top (score if you stop here), bottom (#-1, #+1) remaining in the deck.



The trick is to work backwards from the (0,0) corner and decide at each state whether you want to continue or not. Examples:




  • There is no decision at (0,0), it is worth 0.

  • At (0,1) the choice is between taking -1, or drawing a card which gets 0. Since drawing is better, we now know (0,1) is also worth 0.

  • At (1,0) we take 1 instead of drawing which gets 0.

  • At (1,1) a real decision comes up. Stopping is worth 0. Drawing gets you 1/2 chance to move to (1,0) [worth 1] and 1/2 chance to move to (0,1) [worth 0]. So drawing is worth 1/2 on average, and it is optimal to do so.


You can continue filling in all the states to find the optimal strategy. Note that unequal card counts matter: at say (1,2), drawing gives you 1/3 chance to move to (0,2) and 2/3 chance to move to (1,1).



The filled in square looks like:
$$begin{array}{ccccccc}
stackrel{17/20}{(3,3)} & rightarrow & stackrel{6/5}{(3,2)} & rightarrow & stackrel{mathbf{2}}{(3,1)} & & stackrel{mathbf{3}}{(3,0)}\
downarrow && downarrow && &&\
stackrel{1/2}{(2,3)} & rightarrow & stackrel{2/3}{(2,2)} & rightarrow & stackrel{mathbf{1}}{(2,1)} & rightarrow^{?} & stackrel{mathbf{2}}{(2,0)}\
downarrow && downarrow && downarrow^{?} &&\
stackrel{1/4}{(1,3)} & rightarrow & stackrel{1/3}{(1,2)} & rightarrow & stackrel{1/2}{(1,1)} & rightarrow & stackrel{mathbf{1}}{(1,0)}\
downarrow && downarrow && downarrow &&\
stackrel{0}{(0,3)} & rightarrow & stackrel{0}{(0,2)} & rightarrow & stackrel{0}{(0,1)} & rightarrow & stackrel{mathbf{0}}{(0,0)}\
end{array}$$



States where you stop have their value bolded. At (2,1) it doesn't matter if you draw or stop.



Since you have made value-maximizing choices at every step including the effects of later choices, Strategy 2 is proven optimal, with value exactly 17/20.






share|cite|improve this answer














You can directly compute the optimal strategy and its expected value with a dynamic program (backward induction).



Consider the possible states of the game, which can be completely described by the (number of -1 cards remaining, number of +1 cards remaining), with 16 possibilities.



Arrange them in a square grid as follows (it might be better on paper if you make it a diamond with (3,3) on the left and (0,0) on the right)



$$begin{array}{ccccccc}
stackrel{(0)}{(3,3)} & rightarrow & stackrel{(1)}{(3,2)} & rightarrow & stackrel{(2)}{(3,1)} & rightarrow & stackrel{(3)}{(3,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-1)}{(2,3)} & rightarrow & stackrel{(0)}{(2,2)} & rightarrow & stackrel{(1)}{(2,1)} & rightarrow & stackrel{(2)}{(2,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-2)}{(1,3)} & rightarrow & stackrel{(-1)}{(1,2)} & rightarrow & stackrel{(0)}{(1,1)} & rightarrow & stackrel{(1)}{(1,0)}\
downarrow && downarrow && downarrow && downarrow\
stackrel{(-3)}{(0,3)} & rightarrow & stackrel{(-2)}{(0,2)} & rightarrow & stackrel{(-1)}{(0,1)} & rightarrow & stackrel{(0)}{(0,0)}\
end{array}
$$

The entries are on top (score if you stop here), bottom (#-1, #+1) remaining in the deck.



The trick is to work backwards from the (0,0) corner and decide at each state whether you want to continue or not. Examples:




  • There is no decision at (0,0), it is worth 0.

  • At (0,1) the choice is between taking -1, or drawing a card which gets 0. Since drawing is better, we now know (0,1) is also worth 0.

  • At (1,0) we take 1 instead of drawing which gets 0.

  • At (1,1) a real decision comes up. Stopping is worth 0. Drawing gets you 1/2 chance to move to (1,0) [worth 1] and 1/2 chance to move to (0,1) [worth 0]. So drawing is worth 1/2 on average, and it is optimal to do so.


You can continue filling in all the states to find the optimal strategy. Note that unequal card counts matter: at say (1,2), drawing gives you 1/3 chance to move to (0,2) and 2/3 chance to move to (1,1).



The filled in square looks like:
$$begin{array}{ccccccc}
stackrel{17/20}{(3,3)} & rightarrow & stackrel{6/5}{(3,2)} & rightarrow & stackrel{mathbf{2}}{(3,1)} & & stackrel{mathbf{3}}{(3,0)}\
downarrow && downarrow && &&\
stackrel{1/2}{(2,3)} & rightarrow & stackrel{2/3}{(2,2)} & rightarrow & stackrel{mathbf{1}}{(2,1)} & rightarrow^{?} & stackrel{mathbf{2}}{(2,0)}\
downarrow && downarrow && downarrow^{?} &&\
stackrel{1/4}{(1,3)} & rightarrow & stackrel{1/3}{(1,2)} & rightarrow & stackrel{1/2}{(1,1)} & rightarrow & stackrel{mathbf{1}}{(1,0)}\
downarrow && downarrow && downarrow &&\
stackrel{0}{(0,3)} & rightarrow & stackrel{0}{(0,2)} & rightarrow & stackrel{0}{(0,1)} & rightarrow & stackrel{mathbf{0}}{(0,0)}\
end{array}$$



States where you stop have their value bolded. At (2,1) it doesn't matter if you draw or stop.



Since you have made value-maximizing choices at every step including the effects of later choices, Strategy 2 is proven optimal, with value exactly 17/20.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Nov 24 at 2:05

























answered Nov 24 at 1:44









obscurans

63419




63419












  • I think you switched the order of the cards? (number of -1 cards, number of +1 cards) But this is an excellent answer thanks!
    – tiger88
    Nov 24 at 1:56












  • Thanks, fixed it
    – obscurans
    Nov 24 at 1:57










  • is this trick just something youll find in a generic game theory book?
    – Tim kinsella
    Nov 24 at 2:00








  • 2




    In game theory, this technique is known as backward induction. It will work for any finite game (no possibility of cycling back to the same game state), although the number of states could be immense (say chess with threefold repetition).
    – obscurans
    Nov 24 at 2:04












  • From looking at your end states in the second diagram, what is the syntax to determine the optimal strategy?
    – tiger88
    Nov 24 at 2:52


















  • I think you switched the order of the cards? (number of -1 cards, number of +1 cards) But this is an excellent answer thanks!
    – tiger88
    Nov 24 at 1:56












  • Thanks, fixed it
    – obscurans
    Nov 24 at 1:57










  • is this trick just something youll find in a generic game theory book?
    – Tim kinsella
    Nov 24 at 2:00








  • 2




    In game theory, this technique is known as backward induction. It will work for any finite game (no possibility of cycling back to the same game state), although the number of states could be immense (say chess with threefold repetition).
    – obscurans
    Nov 24 at 2:04












  • From looking at your end states in the second diagram, what is the syntax to determine the optimal strategy?
    – tiger88
    Nov 24 at 2:52
















I think you switched the order of the cards? (number of -1 cards, number of +1 cards) But this is an excellent answer thanks!
– tiger88
Nov 24 at 1:56






I think you switched the order of the cards? (number of -1 cards, number of +1 cards) But this is an excellent answer thanks!
– tiger88
Nov 24 at 1:56














Thanks, fixed it
– obscurans
Nov 24 at 1:57




Thanks, fixed it
– obscurans
Nov 24 at 1:57












is this trick just something youll find in a generic game theory book?
– Tim kinsella
Nov 24 at 2:00






is this trick just something youll find in a generic game theory book?
– Tim kinsella
Nov 24 at 2:00






2




2




In game theory, this technique is known as backward induction. It will work for any finite game (no possibility of cycling back to the same game state), although the number of states could be immense (say chess with threefold repetition).
– obscurans
Nov 24 at 2:04






In game theory, this technique is known as backward induction. It will work for any finite game (no possibility of cycling back to the same game state), although the number of states could be immense (say chess with threefold repetition).
– obscurans
Nov 24 at 2:04














From looking at your end states in the second diagram, what is the syntax to determine the optimal strategy?
– tiger88
Nov 24 at 2:52




From looking at your end states in the second diagram, what is the syntax to determine the optimal strategy?
– tiger88
Nov 24 at 2:52


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3011047%2fexpected-value-of-a-card-game-with-6-cards%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei