28
$\begingroup$

It is known that one cannot beat a truly random player in Rock Paper Scissors.

Here you will play a variant of the game. In this variant you are not allowed to play the same shape twice in a row. So if you have played rock then in the next round you must play paper or scissors.

You will play against a random bot. It will choose shapes uniformly at random while avoiding the same shape twice in a row.

Can you find a strategy that beats the random bot in the long run? More specifically, can you obtain more wins in expectation?

$\endgroup$
2
  • 3
    $\begingroup$ ״It will choose shapes uniformly at random while avoiding the same shape twice in a row.״ You mean, it will choose uniformly at random among the remaining possibilities? $\endgroup$
    – msh210
    Commented Dec 11, 2023 at 11:09
  • 2
    $\begingroup$ yes that's what I meant $\endgroup$ Commented Dec 11, 2023 at 11:19

4 Answers 4

29
$\begingroup$

Here's how you win in the long run

If you win one round, in the next round pick the option which hasn't been picked by either player in the previous round. For example, if you win with ROCK against SCISSORS, pick PAPER in the next round. You are guaranteed to win or draw the next round.

If you draw a round (both players pick the same), in the next round pick the option that would have lost to your previous choice. For example, if you both pick ROCK then pick SCISSORS next. You are guaranteed to win or draw the next round.

If you lose a round, in the next round pick your opponent's previous choice. You then have a 50/50 chance of winning or losing the next round and once you win one, you will never lose again.

Expected number of losses

$\frac{1}{6} + \frac{2}{12} + \frac{3}{24} + \frac{4}{48} + \ldots = \frac{2}{3}$ (over an infinite number of turns).

Thanks to Evargalo for fixing the last calculation.

$\endgroup$
15
  • $\begingroup$ My infinite sums are way behind me, but I think the result is 3/4 (can't be over 1, right?) Anyway, +1 for the clarity of the explanation. $\endgroup$
    – Tloz
    Commented Dec 11, 2023 at 21:38
  • 12
    $\begingroup$ @Tloz The sum is indeed 4/3, and there is no reason it cannot exceed 1. It is the expected number of losses, not a proability if that's what you were thinking. $\endgroup$ Commented Dec 11, 2023 at 22:41
  • 3
    $\begingroup$ @EphraimRuttenberg oh, yeah, my bad. I'll definitly stop browsing stackoverflow afterdark ^^ $\endgroup$
    – Tloz
    Commented Dec 12, 2023 at 15:53
  • 1
    $\begingroup$ @Evargalo gah! you are indeed, correct, I'm sorry. Will correct it. $\endgroup$
    – hexomino
    Commented Dec 13, 2023 at 13:04
  • 1
    $\begingroup$ There is more than one way to write the expectation of the number of losses as a sum; intuitively I would have written 1/3 + 1/6 + 1/12 + 1/24 + 1/48 + ... = 1/3(1 + 1/2 + 1/4 + ...) = 2/3. $\endgroup$
    – Stef
    Commented Dec 13, 2023 at 18:21
20
$\begingroup$

I agree with both answers, but the answer is a little simpler than their explanations. It can be simplified to:

On every round after the first, the best play is what your opponent would have beaten in the last round. If they played rock, you now play scissors. This gives you a win or a tie.

In the event you can't play the best play (because you played it last time), the second best is to play the same one they played last time. This gives you a win or a loss.

Those two rules alone cover every possibility.

For completeness:

Obviously, your play on the first round doesn't matter. You have a 1/3-1/3-1/3 chance of a win/loss/tie.

$\endgroup$
10
$\begingroup$

Yes

Here is a winning strategy:

First play Paper. Just because.

Then at each move there are 3 possibilities:

If you have just made a draw (wlog, you both played Rock) then you both have the same possibilities for the next move, one beating the other (here Scissors > Paper). Play this one (here Scissors) with an expected score of 3/4.

If you have just lost (wlog, you played Rock against Paper), then one of your two possibilities can make either a draw or a loss (here Scissors, vs Scissors or Rock) and the other can either win or lose (here Paper, vs Scissors or Rock). Play the latter one with an expected score of 1/2.

If you have just won (wlog, you played Paper against Rock), then one of your two possibilities can make either a draw or a win (here Scissors, vs Scissors or Paper) and the other can either win or lose (here Rock, vs Scissors or Paper). Play the former one with an expected score of 3/4.

Your expected win is

a linear combination of 3/4, 1/2 and 3/4 with non-zero probabilities, so it is higher than 1/2.

Your probabilities for round n (n>1) are:

loss: P_L(n) = 2^(1-n) / 3
draw: P_D(n) = (3-2^(1-n)) / 6
win: P_W(n) = (3-2^(1-n)) / 6

Counting 1 for a win, 1/2 for a draw and 0 for a loss, your expected score on round n is:

E(n)= (3-2^(1-n)) / 4

When the number of games tends to infinity, your expected average score

tends to 3/4.

$\endgroup$
1
  • 5
    $\begingroup$ If I ever play RPS against you, I need to remember to pick scissors first. $\endgroup$ Commented Dec 14, 2023 at 11:23
6
$\begingroup$

After a possible streak of losses, you can guarantee that you will never lose again.

Start by picking randomly. You have a 1/3 chance to either win, lose or draw.

If you lose, choose whatever they chose. By doing this, you can't draw because they can't choose that same thing again. You have a 1/2 chance to either win or lose.

Example 1: I chose ROCK, they chose PAPER, and I lost. Next, I choose PAPER. They might choose SCISSORS and win, or ROCK and lose.

If you draw or win, choose whatever would be beaten by what they chose. They can't choose the same thing again, so they can't use it to beat you. You have a 1/2 chance to either win or draw.

Example 2: I chose PAPER, they chose PAPER, and we drew. Next, I choose ROCK. They might choose ROCK and draw, or SCISSORS and lose.

Example 3: I chose ROCK, they chose SCISSORS, and I won. Next, I choose PAPER. They might choose PAPER and draw, or ROCK and lose.

You may start in a loss cycle and lose repeatedly. But after you have won or drawn once, this strategy will ensure that you never lose again.

Diagram:

Random RSP

$\endgroup$
2
  • 2
    $\begingroup$ I like the diagram. It clearly shows that once you escape red (losses) you can always avoid going back. $\endgroup$ Commented Dec 12, 2023 at 7:06
  • 2
    $\begingroup$ +1 for identifying that you can go on winning/drawing forever, I didn't realize that when I answered. $\endgroup$
    – Stevish
    Commented Dec 12, 2023 at 13:23

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.