Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
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:
  • 100% paper strategy will win 50% of the time. Of the remaining 50% of games played, (assuming even distribution of the remaining picks) 25% will be losses and 25% will be tied. Thus, you'd be assured a win-loss-tie ratio of 2-1-1, which is quite good. If their remaining options are not distributed evenly, this changes things. You'd want to look at their play to see whether there are any discernable patterns, such that you know that Rock will be played for certain every other move, for example. Then you
    • The opponent is forced to pick 50% rock, but he has no limitations other than that. If you went 100% paper, you'd not beat me playing 50% rock by more than a tiny sliver of a percent it takes me to realize you are going 50% paper.

      And the problem has nothing to do with the someone not just picking rock, but doing so in a very predictable manner. Otherwise, we'd not be talking about someone picking rock 50% of the time, but playing against someone that plays randomly, but tells you what he is picking half the

      • Re:100% paper (Score:5, Informative)

        by BlackPignouf ( 1017012 ) on Saturday April 05, 2014 @12:33PM (#46670773)

        From TFA: "At the start of each round an independent judge flips a fair coin and tells your opponent the result but does not tell you. If the coin came up heads your opponent must play rock."
        The opponent isn't forced to get at least 50% rock after any number of plays.

    • by seyyah ( 986027 )

      100% paper strategy will win 50% of the time. Of the remaining 50% of games played, (assuming even distribution of the remaining picks) 25% will be losses and 25% will be tied

      No, you are describing another game where the opponent is forced to play rock 50% of the time, paper 25% of the time and scissors 25% of the time.

      This game is different.

      (I'm repeating my self from another post but many people are making the same mistake)

  • With no such restriction, random choices on both sides lead to 33% win, 33% draw, 33% loss, right? With the opponent throwing Rock 50% of the time, assuming the other 50% is evenly divided between Paper and Scissors, if I always throw paper I'll win 50% of the time, lose 25% of the time, and draw 25% of the time.

    So depending how the betting works, I'd be pretty willing.

    • by seyyah ( 986027 )

      With no such restriction, random choices on both sides lead to 33% win, 33% draw, 33% loss, right? With the opponent throwing Rock 50% of the time, assuming the other 50% is evenly divided between Paper and Scissors, if I always throw paper I'll win 50% of the time, lose 25% of the time, and draw 25% of the time.

      So depending how the betting works, I'd be pretty willing.

      No, you are describing another game where the opponent is forced to play rock 50% of the time, paper 25% of the time and scissors 25% of the time.

      This game is different.

  • by Anonymous Coward

    Expect them to play scissors a lot to beat your paper. Play rock as often as they play scissors.

  • put a spin on it (Score:4, Interesting)

    by ihtoit ( 3393327 ) on Saturday April 05, 2014 @12:09PM (#46670575)

    Rock, paper, scissors, lizard, Spock!

    Scissors cut paper
    Paper covers rock
    Rock crushes lizard
    Lizard poisons Spock
    Spock smashes scissors
    Scissors decapitate lizard
    Lizard eats paper
    Paper disproves Spock
    Spock vaporizes rock
    Rock crushes scissors

    • I'd argue that this wouldn't change the fundamental outcome of the experiment, since by definition no one selection has a fundamental advantage or disadvantage over any other. In either game, you make a decision, then have a 50/50 chance of winning the round.

      • scissors beats paper and lizard; loses to rock and Spock ( 50% win, given even distribution)
      • paper beats rock and spock; loses to scissors and lizard (50% win, given even distribution)
      • rock beats scissors and lizard; loses to paper and spock (50% win, giv
  • I think the winning strategy is to randomly throw 50% paper to cover his rock. I'm just guessing though. No idea how much to pay.

  • How would you measure 50%? When does the game end? If my opponent strictly goes by 50 25 25 then Yes, I'd be happy yo play for an infinite amount of money, however given the play I am going to be playing, my opponent may opt/adapt for 50 0 50 instead and we are stalemate again .. So the game is rigged, conditions flawed, how would you measure those 50%?
  • Assuming we randomly use 50% paper and 50% rock, we get:
    - on rounds he is forced to play rock, we get half victory and half tie, so 25% win, 25% tie so far
    - on other rounds he can:
    - always use scissors, which will turn into our 25% win, 25% lose - we win overall, 50% win, 25% tie, 25% lose
    - always use rock, which will turn into our 25% tie, 25%win - we win overall, 50% win, 50% tie
    - always use paper, which will turn into 25% win, 25% lose - we win overall, 50% w

    • by artor3 ( 1344997 )

      I think you have an error in there. His best strategy in your example would be to always use paper, in which case he's doing the exact same thing as you are, and so the odds are even.

      I think your best strategy would have to involve reacting to his. Start with 100% paper until you see what he's throwing when he's not throwing rock. This gives you at least even odds regardless of what he does.

      He'll probably start throwing scissors, at which point you switch to you switch to 50% rock 50% paper. This will h

      • by abies ( 607076 )

        Yes, you are right - paper will be 25% tie, 25% lose, ending up with 50% tie, 25% win, 25% lose, so still purely random.

        I don't think that strategy we are looking for involves "reactions" - this can be always defeated by opponent which overguess you by one step. I would hope to find a strategy which would lead you to win > 50% even if opponent knows it (strategy itself, not the result of random choice at given stage).

        • by artor3 ( 1344997 )

          How would the opponent overguess you? You can delay your strategy switch for as little or as much time as you like, since their best strategy only breaks even.

          If they don't know what you're doing, you could rack up more wins by exploiting flaws in their strategy, and rack up even more wins when they "wise up" and try to counter you. I guess the difference between our answers is that I'm treating this as an actual game against another person, whereas you're looking for more a game theoretical optimum.

          Now,

      • Ok, my current guess would be around 1/3 rock and 2/3 paper. Opponent cannot replicate this strategy, because of requirement of having at least 50% rock. If he goes 50% scissors, he will have 1/6 tie, 2/6 lose, 1/6 lose and 2/6 win, so 3:2 in my favor. With 50% paper, he gets 1/6 tie, 2/6 lose, 1/6 win, 2/6 tie, so 2:1 in my favor. 100% rock is obvious lose. I think that mixing scissors and paper will be clearly worse than pure scissors on his part (because with scissors, he has at least 2/3 chances of winn

  • by NeuroBoy ( 82993 ) on Saturday April 05, 2014 @12:31PM (#46670765)

    I've been having students in my introductory programming courses work on this class of problem for a few years.. They all seem to really enjoy it. I code up bots to play RPS with certain biases just like the OP and they have to program a single player that identifies the bias in an opponent and adjusts its play to give it an advantage. They all routinely can generate solutions that perform far better than random against predictable, dumb bots, but things get very interesting when I throw the students' bots against each other in a throwdown tournament. :)

  • by Anonymous Coward

    If i know the number of rounds in advance (atleast your oponent has to right if he needs to calculate the 50%). I would recalculate the odds after every round taking into account the number of rock move remaining for him...

  • Like drawing to an inside flush, an "optimized" strategy is not necessarily what the opponent plays. There is no reason inherent in the description to make assumptions about the opponent's other play. They may also be constrained to play paper the other fifty percent of the time, and to play paper , then rock, then paper, then rock. In the real world, don't assume that the minimal description of the problem gives all the important data.

    • I play a lot of poker, but I've never heard of an "inside flush" draw. I know the inside straight draw, and I suppose you could have an inside straight flush draw, but a flush is just a draw for another like suited card. All flush draws have nine possible outs unless you have seen your opponents cards and know there are fewer. An inside straight has only four outs, which is why it is a bad draw most of the time. An open ended straight has eight outs, which makes it almost as good as the flush draw. Bot
  • there is a factual problem with the summary.TFA says it all so better read it. If not read this (I hope not to mess up it too much).

    It is not required of the opponent to play rock 50% of the time. The referee is using a fair coin to determine if your opponent is to play rock or not. If s/he is not forced to play rock s/he is free to chose allowing him also to chose rock 100% of time too if s/he so wishes.

    • It is not required of the opponent to play rock 50% of the time. The referee is using a fair coin to determine if your opponent is to play rock or not. If s/he is not forced to play rock s/he is free to chose allowing him also to chose rock 100% of time too if s/he so wishes.

      It totally is required to play rock 50% of the time. It's not required to play rock exactly 50% of the time.

      • by Richy_T ( 111409 )

        No. Depending on the luck of the coin, they might be required to play rock anywhere from 0 to 100% of the time.

        • Obviously it's a long-time average. The chance of deviating from 50% by any given amount goes to zero as the number of trials becomes arbitrarily large. The summary doesn't spell this out in iron-clad logic, but anyone who spends time thinking about math, stats, or especially game theory knows the score.

    • by osu-neko ( 2604 )

      there is a factual problem with the summary...

      It is a bad summary, but only because the wording is ambiguous, not that it's factually incorrect. The statement you're objecting to is perfectly correct in one interpretation, and dead wrong in another. Your own counter-statement, "it is not required of the opponent to play rock 50% of the time," is equally ambiguous. In fact, 50% of the time (assuming a fair coin), the opponent is required to play rock, so it's true that "it is required of the opponent to play rock, 50% of the time". Leaving out the c

    • by Lehk228 ( 705449 )
      50% of the time the opponent is required to play rock
  • "Never go in against a Sicilian when death is on the line!"
  • Lets call the guy with the restriction player 1 and the other player 2.
    If you think about it player 1 got 3 "pure" strategies (as in: each other strategy he can play can be seen as a mixture of these 3):
    (1) rock 100%,
    (2) paper 50%/rock 50% and
    (3) scissors 50%/rock 50%.
    Against (1) rock gives 0, paper -1 and scissors 1.
    Against (2) rock gives 1/2, paper -1/2 and scissors 0.
    Against (3) rock gives -1/2, paper 0 and scissors 1/2.
    In each case, the number is the probability of player 1 winning minus player 2 winnin

    • Sorry :/ There are some mistakes in the last part. The strategy for player 1 wins 1/2-1/6=1/3 and not 1/6 as claimed. Also, the strategy for player 2 wins 2/3 against pure rock and not 1/3 as claimed. Still, it just makes it even clearer that you should not play rock with probability more than 50% as player 1 and not play scissors at all.

      Also, to be more precise, the strategy for player 1 is to play rock with probability 1/2, paper with probability 1/6 and scissors with probability 1/3.

    • by abies ( 607076 )

      I still think that 38.4% rock and rest paper is better solution for 'free' player, than 1/3 rock and 2/3 paper if we assume that 'limited' player is very smart and knows 'free' player tactic upfront.

      Can you tell me, what is the strategy which 'limited' player can take against 38.4% rock, rest paper which would lead to worse result for 'free' player than what you propose? I would suggest simulating the results before jumping to conclusion. I was also originally thinking that 1/3 rock is optimal, but increasi

  • by Anonymous Coward

    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 i

  • Two Games (Score:4, Insightful)

    by inhuman_4 ( 1294516 ) on Saturday April 05, 2014 @01: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.
    • The opponent could respond to this by playing scissors on all non-forced-rock turns. If the opponent plays rock, you win 4/6 of the time and lose 1/6 of the time, but if the opponent plays scissors you lose 4/6 of the time and win 1/6 of the time, so overall you'd be even.

      • The opponent doesn't have the option to play anything greater than 1/2 scissors because the other 1/2 must be rock. If he uses the "all scissors" response, he can only actually do a 1/2 scissors response. So is we play it out:

        1/2 scissors x 4/6 paper = 2/6 = 1/3 victory for the opponent. 1/2 scissors x 1/6 scissors is 1/12 tie. And 1/2 scissors x 1/6 rock is 1/12 lose. So the "all scissors" strategy only nets him 1/3 victory not 4/6.
        • I listed the chances in the context of the opponent move ("if the opponent plays rock"). The chance of playing rock or playing scissors is 1/2 each (the coin toss), so if you list it as overall chances you get 1/3 win and 1/12 loss (same as you wrote) due to the opponent playing scissors and also 1/3 loss and 1/12 win due to the opponent playing rock; the expected result result is still 0.

      • by mestar ( 121800 )

        How the fck would you manage to lose 4/6 of the time to an opponent who must play rock at least 50% of the time?

        • by jpatters ( 883 )

          Re-read the GP. The claim is that when the opponent responds by playing scissors 50% and rock 50%, you will win 4/6 of the time when they play rock and you will lose 4/6 of the time when they play scissors, which makes it 50/50. The stronger claim is that the opponent can adjust to any consistent strategy that you choose, ultimately making it a 50/50 game.

          • Yes, that's what I meant. I originally though the stronger claim might be true but it is not: as Reaper9889 pointed out in another post, you should never play scissors. If you stick to that and are not so greedy to play 100% paper (to be exact: 1/2 < paper < 1, optimum at 2/3), you make a profit no matter how the opponent responds.

    • There is a flaw in your reasoning. You do not know that your oppoent flipped so you can not condition on it like you do here (you can not play paper all the time if he "flips" rock because you do not know his coin flip). If you think about it you should NEVER play scissors. In the best case for you he plays rock 50% and paper 50% and you get 0 in expectation and clearly you got an advantage so 0 is not good.

      The optimal strategy is to play 1/3 rock, 2/3 paper. It gives at least 1/6 against anything he could

      • We know that the opponent must play rock 1/2 of the time.

        If I play paper 4/6 of the time, than I should expect 1/2 of my paper to align with his rock. So 4/6 * 1/2 = 2/6 = 1/3. So I should expect to win 1/3 of the time, plus my winnings on the other combinations. That means 1/3 is the lower bound.

        If you play 1/3 rock and 2/3 paper, his response will be 1/2 paper and 1/2 rock. So you are going to get 2/3 * 1/2 = 1/3 for your paper. But your 1/3 rock will never win because he will never play scissors either.
        • This is where the two games key comes in. You and I both recognize that 2/3 paper is the right move because 1/2 of his moves will be rock. But by playing the other half as regular RPS with a win/tie/loss of 1/1/1 you can expect the win/loss to cancel out, leaving you with your 1/3 lower bound advantage

          If you're playing 2/3 paper and 1/3 rock vs 1/2 rock and 1/2 paper, the regular RPS subgame is 2/3 paper and 1/3 rock vs paper, which has an expected result of 1/3 loss for the subgame, or a 1/6 loss contribution to the total game. It won't cancel out: you can't get a consistent 0 result from the regular RPS subgame since you play paper more than 1/3 of the time and the opponent can take that into account by not playing rock in the subgame at all.

          Versus 2/3 paper and 1/3 rock, it actually doesn't matter in

    • You've come up with a fair answer, but the flaw in your reasoning is that the RPS game is less independent of the coin toss game.

      In particular, the coin toss game makes scissors an obvious loss. No solution that includes scissors can possibly be optimal, because scissors loses at minimum 50% of the time.

      Redistribute your scissors over to rock and work it out on a calculator; you'll see an improvement in outcomes.

  • by MtHuurne ( 602934 ) on Saturday April 05, 2014 @01: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.

    • You can get an advantage. The important point is to notice that you should not play scissors ever. You can only get 0 in expectation IF he plays paper 50% and rock 50% and he gets an advantage otherwise and 0 is not good for you :/ See my above post for further details (spoiler: The optimal choice for you is 1/3 rock, 2/3 paper).

      • So here's what I have:

        First, there is some uncertainty about what ratio of your opponent's throws will be paper. Let's call that ratio x. This means that we can define the likelyhood of his throws this way:

        HeDoesRock = .5, HeDoesPaper = x, HeDoesScissors = .5 - x

        Now you need to figure out the optimal winning ratio of your throwing either rock or paper.

        YouWinIfRock = HeDoesScissors = (.5 - x); YouLoseIfRock = HeDoesPaper = x
        YouWinIfPaper = HeDoesRock = .5; YouLoseIfPaper = HeDoesScissors = .5 - x

        W

      • You're right about never playing scissors. Since the perfect opponent will know you're never going to play scissors, he won't play rock any more than is required, so 50% of the time. This leads to an overall win frequency (profit) of (1 - 3 * Rp) * Po + Rp / 2, where Rp is how often you play rock and Po how often the opponent plays paper.

        With 1/3 rock, the profit becomes 1/6 no matter what the opponent does. If you play less than 1/3 rock, Po is positive for your profit, so the opponent will opt to never pl

  • at his head
  • If your opponent must throw rock 50% of the time, then you throw paper 100% of the time.

    You will win AT LEAST 51% of the time, because you get the 50% gifted to you, and the other non-0% of the times that your opponent throws paper will cause a rematch.

  • If there were no betting caps, I would progressive bet on paper. Bet 1 dollar paper. If lose, bet 2 dollar. If lose, bet 4 dollar. If lose, bet 8 dollar, et al. Once you win you reset back to zero. This naturally has drawbacks and potential for huge failure, but I've had good luck with it in blackjack and roulette if betting caps are high and I have about $10000 to play around with.
  • To figure out what you should do, first assume your opponent is rational, and will make good choices whenever he is able. Since he knows that you will play a paper-heavy strategy to counter his rock-heavy strategy, it would not be rational to voluntarily choose more rocks. That could only make things worse.

    But if he tried to exploit your paper-heavy strategy by throwing scissors on turns when he gets a choice, you'd have a perfect strategy against this: All rock. On forced rock, you get a redo, and on non-f

  • It says that rock *must* be thrown 50% of the time. Not that there is a 50/50 chance of the choice being rock for each game. So the number of games *has* to be set out before gaming commences. As you draw closer to the last game, the odds will change to how likely rock will be thrown. This is very similar to counting cards in a blackjack.
  • doesn't include a consideration of my lifespan. If I only live 100 years my opponent can play scissors every single game and play rock continuously after I am dead and the restriction would still be satisfied. In other words, "having to play rock 50 percent of the time" doesn't give you any relevant information about your opponent's behaviour.

    • Good point, the important specification would be "50% of what time?"

      I've always had this problem about the whole idea of probability. If the odds of you dying in a car accident are 1/1000000, and you still die tomorrow, what good is the low number of one millionth? You either die or you don't. Probability is only a measure or a larger population, i.e. the fraction that gets the rock, death or whatever. The idea of a probability for a unique event is meaningless.

      This is why I like the many-worlds interp

  • by Richy_T ( 111409 ) on Saturday April 05, 2014 @06:19PM (#46672875) Homepage

    You kick him in the testicles and let him keep the chicken.

  • As some have said, the optimum is a mixed strategy of playing paper 2/3 of the time and rock the rest of the time.

    Let's say we're player 1 and they're player 2. The way to calculate this exactly is to first observe that the general form for each players mixed strategy is:

    P(r1) + P(p1) + P(s1) = 1
    1/2 + P(p2) + P(s2) = 1

    where, for example, P(r1) is the probability of a rock being played by player 1.

    This means that for a given P(r1), P(p1) and P(p2),

    P(s1) = 1 - P(r1) - P(p1) [1]
    P(s2) = 1/2 - P(p2)

    • by Nux'd ( 1002189 )

      Another correction (this time to the second to last line): "Finally it's nice to observe that when player 1 sets x = 1/3, the second player's choice of z has no effect on the gains function whatsoever."

      I really should have proofread this post.

    • by Nux'd ( 1002189 )

      Oh my, another correction and this one is bigger! I assumed that player 2 would always play the rock half the time when in fact he is still able to choose rock even when the coin-toss doesn't force it. This adds another variable for which I didn't account.

      Still, without going into expanding the probabilities, my intuition tells me that it doesn't improve his strategy to increase the rate of playing rock as this would only makes him more exploitable. Whether my intuition is correct is something I'll test at

  • Based on @ShanghaiBill's solution, I wrote a solver and simulation in Python (that also fixes ShanghaiBill's buggy pinning of "him.rock" to 0.5 - the player could in theory, choose to play rock at more than 50% probability). Use Pypy for speedy execution - I uploaded the code to GitHub: https://github.com/ttsiodras/R... [github.com]
  • He could throw whatever he likes in the short term, and claim he was going to make up the 50% rock in the long term. How would you disprove this?

Utility is when you have one telephone, luxury is when you have two, opulence is when you have three -- and paradise is when you have none. -- Doug Larson

Working...