6
$\begingroup$

You are playing a series of 100 games of rock-paper-scissors^ against your friend. From your past games, you know that he will choose exactly 40 rocks, 35 papers and 25 scissors in some random order. What should be your strategy to maximize the number of wins over the 100 games?

^ Rock beats scissors, scissors beat paper, paper beats rock and otherwise it is a draw.

$\endgroup$
5
  • 1
    $\begingroup$ Note that people play these actions with roughly these probabilities in real life. $\endgroup$ Commented Feb 2, 2023 at 11:31
  • $\begingroup$ I'm having a hard time incorporating "random" and "40/35/25" in my thought. I get the feeling the algorithm that combines those two could lead to a specific strategy. Could you give an example? Like, "uniformly choose any element for which the total is not consumed"? $\endgroup$ Commented Feb 2, 2023 at 11:56
  • 5
    $\begingroup$ @GeorgeMenoutis create a vector with 40 rocks, 35 papers and 25 scissors. Now shuffle that vector randomly. This is what I mean. $\endgroup$ Commented Feb 2, 2023 at 12:02
  • $\begingroup$ Do you mean maximize wins irrespective of losses? I.e. would 40 wins, 40 losses 20 draws be better than 39 wins, 30 losses 31 draws? $\endgroup$
    – loopy walt
    Commented Feb 2, 2023 at 16:36
  • $\begingroup$ @loopywalt my original question was just about maximizing the wins. However now that I think about your comment it would also be interesting to maximize something like 3*wins+1*draws. $\endgroup$ Commented Feb 2, 2023 at 18:59

3 Answers 3

7
$\begingroup$

Initialise $p_{rock} = \frac{40}{100}, p_{paper} = \frac{35}{100}, p_{scissors} = \frac{25}{100}$.

Choose the opposition attack which destroys their most probable option. So, best option to win in first turn is paper which destroys the rock. Continuously update these probabilities as game progresses. For example, if he choses rock in the first turn, update the probability of rocks to $\frac{39}{99}, p_{paper} = \frac{35}{99}, p_{scissors} = \frac{25}{99}$.
Repeat this for all turns.

$\endgroup$
3
  • 1
    $\begingroup$ rot13(Na nqq-ba pbzzrag: Guvf vf gur zbfg bcgvzny zrgubq gb znkvzvmr gur rkcrpgrq ahzore bs jvaf, ohg gurer ner punaprf lbh znl raq hc jvaavat yvggyr gb ab tnzrf, vs lbh trg hayhpxl. Gur znkvzhz ahzore bs thnenagrrq jvaf vf 40, ol cynlvat cncre 100 gvzrf. Hfvat yvarne cebtenzzvat, vg pna or fubja ab fgengrtl rkvfgf juvpu thnenagrrf 41 jvaf.) $\endgroup$ Commented Feb 2, 2023 at 12:17
  • 1
    $\begingroup$ @VeryStaleAndDeadAccount, that's not correct. This strategy, besides being optimal for expected wins, does in fact guarantee at least 40 wins. Let W be number of wins so far, and R be the remaining count of the most probable outcome at a given time. Initially, W+R = 0+40 = 40. But W+R can never decrease: - If I lose, W and R are unchanged - If I win, and there was strictly one most probable option, W+=1 and R-=1 - But if I win and there was a tie, another option becomes the "most probable". W+=1 but R is unchanged, so (W+R) += 1. By the end when R is 0, W+R (hence W) must be ≥40. $\endgroup$
    – Jimmy He
    Commented Feb 3, 2023 at 8:32
  • 1
    $\begingroup$ This is the obviously optimal strategy for maximizing wins. And if you want to maximize 3 x wins + 1x draws (football scoring) you simply calculate expected utility of your options in the very same way, from start it would be 0.4*3 + 0.35*1 = 1.55 for paper, 1.3 for scissors and 1.15 for rock, so you pick paper. $\endgroup$ Commented Feb 3, 2023 at 8:46
9
$\begingroup$

If my friend is playing without a strategy, the best approach would be

to keep track of their cards and choose the one that beats the most cards in their possession.

Note: I imagined that they were playing a rock-paper-scissor card game because the number of possible outcomes for my friend's moves was precise.

$\endgroup$
2
  • 1
    $\begingroup$ 1R1P1S doesn't have mere 50% to win. IF you first pick R and lose as he picked P (33%), what remains is R+S, so you pick R and with 50% chance win 2:1 and with 50% draw with final 1:1. If he picked S (33%) you have R+P to beat, picking P leads to 50% to win 3:0 and 50% to win 2:0. Now for R (33%) you have P+S to beat, picking P gives you 50% to win 2:0 and 50% to win 1:0. In total, you end up with 5 wins out of 6 and 1 draw. $\endgroup$ Commented Feb 3, 2023 at 8:40
  • $\begingroup$ oo I did not consider draws! I will fix it :) Thanks @ZizyArcher $\endgroup$
    – Oray
    Commented Feb 3, 2023 at 11:26
4
$\begingroup$

The randomness of the sequence must be more clearly defined to provide an answer.

My first thought was like the answers of Oray and gsomani. However, this assumes the following randomness rule be followed by our friend: "Choose an element with probability equal to its remaining appearences divided by the numbers of rounds left".

However, this is still an assumption. Observe an alternative: "Choose an element with probability 40% rock, 35% paper, 25% scissor, and normalize if any of them have consumed all their appearences". It is very arguable whether this is closer to the natural behaviour of humans, as Dmitry adds.

Those have vastly different strategies. In the case where, after a few rounds, there were 2 rocks and 10 scissors remaining, the first strategy would lead you to choose scissor (expecting it to appear with 10/12 probability), while the second one would lead you to choose rock (with probability ~60%).

After Dmitry defined the randomness as a randomized vector, I think it comes closer to the first one. However, conditional probabilities have tricked me times and again. The question is: If there is such a randomized vector, and we know there are such predetermined totals, and we know the first N results, what is the probability of each value for the N+1 result?

$\endgroup$
2
  • $\begingroup$ Of course, "randomized vector" is not a rigorous description, but if we assume it to mean "each one of the 100! possible orderings of the elements has the same probability", then yes, the conditional probability distribution of the (N+1)-th element given the previous N elements is equal to the remaining amount of each element divided by the number of rounds left. $\endgroup$
    – wimi
    Commented Feb 3, 2023 at 18:00
  • 1
    $\begingroup$ This is because, if we mark each element uniquely and the first N elements are already fixed, there are (100-N)! possible sequences. If the first (N+1) elements are fixed, there are (100-N-1)! possible sequences. This is independent of which elements were chosen. So the conditional probability of each possible choice of the (N+1)-th element is (100-N-1)! / (100-N)! = 1/(100-N), equal for all possible choices. If we now unmark the elements again (combining elements of the same type into one probability), we get that element E has probability remaining_amount(E) / (100 - N). $\endgroup$
    – wimi
    Commented Feb 3, 2023 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.