Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Math Stats Games Science

A Rock Paper Scissors Brainteaser 167

New submitter arsheive (609065) writes with a link to this interesting RPS brainteaser: "How do you play against an opponent who _must_ throw Rock 50% of the time, and how much would you be willing to pay to play against them?"
This discussion has been archived. No new comments can be posted.

A Rock Paper Scissors Brainteaser

Comments Filter:
  • by Anonymous Coward on Saturday April 05, 2014 @02:23PM (#46671093)

    Over the long term, the strategy must converge to stable, therefore true random can be the only optimized strategy.

    50% of time opponent must play R. The remaining 50% of the time they can equally choose R,P,S.

    R -> P = 1/2 + 1/3 * 1/2
    S -> R = 1/3 * 1/2
    P -> S = 1/3 * 1/2

    For a guaranteed win, roll a die: 1-4 => P, 5 => R, 6 => S.

    By how much? Consider you are random as above and opponent is fixed wlog at 100% R. You win 2/3 of the time and lose 1/6 of the time.

    The expected payoff to play is 2/3, the expected cost is 1/6. Payoff - cost = 1/2, so the most you should be willing to pay to play a $100 game is $150.

  • Two Games (Score:4, Insightful)

    by inhuman_4 ( 1294516 ) on Saturday April 05, 2014 @02:23PM (#46671095)
    You should play paper 4/6 of the time, rock 1/6, and scissors 1/6 of the time.

    The key (if you RFTA) is that whether or not your opponent plays rock is determined by a coin toss. So really you are playing a compound game. You are playing a coin toss and rock paper scissors (RPS). Since the coin toss determines your opponents move, you can think of it as playing 50% coin toss and 50% RPS. The RPS is a subgame of the coin toss.

    Since the coin toss is the dominate game, you play with win that first. But instead of heads/tails, it is paper/other. The answer to the coin toss is a 50/50 guess of heads/tails, so the answer to the paper/other is 50% paper, 50% other.

    The "other" is the RPS game. And since the answer to the RPS game is 1/3 rock, 1/3 paper, 1/3 scissors, we know what the solution to the other 50% of the game is.

    So the equations are:choice = (Coin Toss) + (RPS) so: paper = 1/2 + 1/3, rock = 0 + 1/3, scissors = 0 + 1/3. Or paper = 4/6, rock = 1/6, scissors = 1/6.
  • by MtHuurne ( 602934 ) on Saturday April 05, 2014 @02:32PM (#46671157) Homepage

    First, make sure you read TFA, since it explains what the summary doesn't: how the 50% is determined and how the opponent can play in the non-forced turns.

    If you play using a deterministic algorithm, for example always play paper, the opponent can figure it out and beat you on all the non-forced turns. At best you'll get an even result.

    If you play using a random algorithm, the opponent can figure out the frequencies you're using and compensate for that. For example, if you decide to play paper 50% of the time and rock and scissors 25% of the time, you'd win against an opponent playing rock 50% of the time and paper and scissors 25% of the time. However, if the opponent decides to play rock 50% of the time and scissors the other 50%, the result is even again. If the opponent would be forced to play rock more than 50% of the time, there is no room to compensate and you would win consistently with 100% paper. I think that with 50% rock, there is enough room to respond to any frequency distribution you can come up with, although I have no proof for that.

    You could change your algorithms during play, but if there isn't any algorithm that results in an advantage when playing it consistently, gaining an advantage from changing your algorithm would depend on how well your opponent responds to your changes. In other words, you're playing mind games. I don't think the 50% rock restriction is going to be of any help here.

  • by ShanghaiBill ( 739463 ) on Saturday April 05, 2014 @02:48PM (#46671263)

    The Nash Equilibrium [] is for you to play paper 2/3rds of the time, and rock 1/3rd. His best counter strategy is to play rock 50% (he cannot go lower) and scissors 50%. He cannot do better. If you deviate from 2/3 paper and 1/3 rock, he can adjust his strategy to do better. With the optimal strategy, you will win 1/2, lose 1/3, and tie 1/6.

    Here is my search for the Nash Equilibrium:


    struct rps {
        double rock;
        double paper;
        double scissors;

    static double
    eval(struct rps *a, struct rps *b)
            (a->rock * (b->scissors - b->paper)) +
            (a->paper * (b->rock - b->scissors)) +
            (a->scissors * (b->paper - b->rock));

        struct rps you;
        struct rps him;

        him.rock = 0.5;
        double worst_best_eval_for_him = 1.0;
        double best_rock_for_you = 0;
        double best_paper_for_you = 0;
        double worst_best_paper_for_him = 0;
        double dx = 0.001;
        for (you.rock = 0; you.rock best_eval_for_him) {
                        best_eval_for_him = p;
                        best_paper_for_him = him.paper;
                if (worst_best_eval_for_him > best_eval_for_him) {
                    worst_best_eval_for_him = best_eval_for_him;
                    best_rock_for_you = you.rock;
                    best_paper_for_you = you.paper;
                    worst_best_paper_for_him = best_paper_for_him;
        printf("worst_best_eval_for_him = %f\n", worst_best_eval_for_him);
        printf("best_rock_for_you = %f\n", best_rock_for_you);
        printf("best_paper_for_you = %f\n", best_paper_for_you);
        printf("worst_best_paper_for_him = %f\n", worst_best_paper_for_him);
        return 0;

Some people manage by the book, even though they don't know who wrote the book or even what book.