Slashdot Mirror


Can You Beat a Computer At Rock-Paper-Scissors?

tekgoblin writes "The New York Times has created a game that uses artificial intelligence to outsmart you. It uses a simple game called Rock-Paper-Scissors which is pretty much known by everyone on the planet by now. The computer tries to mimic human reasoning by building on simple rules and statistical averages. So based on the rules of the game and your previous moves, the computer tries to make predictions on your next move. The game has 2 modes, the first being Novice, where the computer learns the game from scratch, and Veteran, where the computer has experience of over 200,000 rounds of previous experience."

14 of 292 comments (clear)

  1. I can beat the computer... by bobdotorg · · Score: 5, Funny

    ... in the slightly modified version:
    Rock-paper-scissors-control-alt-delete.

    --
    __ Someday, but not this morning, I'll finally learn to use the preview button.
    1. Re:I can beat the computer... by Mortiss · · Score: 4, Funny

      Rock-paper-scissors-control-alt-delete.

      Typical human behavior... Always resorting to violence.

    2. Re:I can beat the computer... by bmorency · · Score: 5, Informative

      I prefer rock paper scissors lizard spock myself.

    3. Re:I can beat the computer... by daid303 · · Score: 4, Funny

      http://www.umop.com/rps101/rps101chart.html
      I prefer dynamite tornado quicksand pit chain gun law whip sword rock death wall sun camera fire chainsaw school scissors poison cage axe peace computer castle snake blood porcupine vulture monkey king queen prince princess police woman baby man home train car noise bicycle tree turnip duck wolf cat bird fish spider cockroach brain community cross money vampire sponge church butter book paper cloud airplane moon grass film toilet air planet guitar bowl cup beer rain water tv rainbow ufo alien prayer mountain satan dragon diamond platinum gold devil fence video game math robot heart electricity lightning medusa power laser nuke sky tank helicopter myself.

    4. Re:I can beat the computer... by Broolucks · · Score: 4, Informative

      It does not matter whether the computer favors a choice more than the other. Imagine that there is maximal favoritism and the computer just always picks rock. If you play randomly, you will win 1/3 of the time (whenever you happen to randomly pick paper), you will lose 1/3 of the time (idem, scissors), and you will tie 1/3 of the time (idem, rock).

      Imagine the computer picks rock X% of the time, paper Y% of the time, scissors in all other instances. Whenever it picks rock, you have 1/3 odds of picking paper and winning. Whenever it picks paper, you have 1/3 odds of picking scissors and winning. Whenever it picks scissors, you have 1/3 odds of picking rock and winning. X * 1/3 + Y * 1/3 + (1 - X - Y) * 1/3 = X/3 + Y/3 + 1/3 - X/3 - Y/3 = 1/3, for all X and for all Y. No strategy can expect to win or lose against a random strategy more than 1/3 of the time in the limit of the number of rounds played.

  2. First paper, then scissors, then rock by presspass · · Score: 5, Funny

    Slap the paper over the intake fan, cut the Ethernet cable with the scissors, then bash it with the rock, easy.

    --
    Pass

  3. Yes by TimmyRt · · Score: 3, Funny

    At 10-3-2 I feel like I can say yes. Now do my dishes computer!

  4. Re:#winning! by SimonTheSoundMan · · Score: 3, Funny

    I wasted 10 minutes of my day playing this yesterday. I then looked at others who were playing Farmville, made it feel like they were doing something productive for a change.

  5. Re:This game is random , you can't outsmart someon by Tukz · · Score: 3, Interesting

    Your choices aren't truly random though.
    It's been argued many times, that people make choices in patterns.

    --
    - Don't do what I do, it's probably not healthy nor safe. -
  6. TL:DR; No. by definate · · Score: 4, Funny

    If it's designed to outsmart me, I'm guessing unless I really learnt its algorithms, and there was a limit placed on its memory/analysis, that I couldn't.

    Don't mean to brag, but I'm pretty fucking awesome when it comes to Paper-Rock-Scissors (it's like Rock-Paper-Scissors with ROT1). The reason I was good, was I was good at gauging the intelligence of my opponent, and emulating how they would emulate me, then moving to the next level.

    The best experience of this was a competition at school, where you had to beat one person, advance to level 2, beat a level 2, advance to level 3, until I think it was level 6 or 7. If you lost, you got demoted, if you won, you advanced. It was the best of 3. This was done in quick succession, eg, the entire game took about 5 minutes for me, 30 minutes to an hour for others.

    I won by beating level 1 (easy), people think you go rock, so they go paper, so I go scissors. Next they chase scissors, not sure why, but this round is in quick succession to the first, and maybe its being unable to come up with anything else, so I go rock. BAM! LEVEL UP!

    Next level was relatively easy, they must have had a similar thought process to me, so I go rock (remembering the decision process for level 1). Next they go 2 moves ahead from rock, because that's their level of emulation. This means they go scissors again. So I go rock. BAM! LEVEL UP!

    Next level was harder, first round they had the level 2 decision process, but the second round they've caught on, so I need to go scissors, which is 1 move ahead (or could also be seen as taking the level 2 decision process, but I modeled it in my mind as taking 1 move ahead). They go paper! BAM! LEVEL UP!

    Next level was much harder, but by now I got a good idea of what I should be doing. Following on from before, I emulate them as my last turn, and BAM! LEVEL UP!

    Did this a few times.

    At the end had a collision, I went rock, they went rock. WHOAH! FIRST LOSS/DRAW! I realized that this person was doing exactly as I was doing, the hard problem then became, modelling my own process. I remember we did the count down 1..2.. and I said stop. Wait. Because I couldn't walk through the chain of previous decisions fast enough in my mind, to come at the one I want. Once I had it, I went, okay go. 1...2...3...BAM! I WIN! Next round, 1...2...3...BAM! I WIN! LEVEL UP!

    I'm now crowned king of all students and get to go sit on the benches and wait for the idiots. When I talked to the people who finished next, and asked them what they did, they explained it exactly how I did. In the end, I was able to predict their capability one further though. A large part of why the decision processes above would have worked was also because I was the first to level up, and get out, if I messed up early on, and got stuck amongst the riffraff I'd likely be unable to apply the same reasoning, as each level would follow that process less, and be less refined. Also, give I sort of knew these people, I probably had a reasonable feeling on their ability to think like me, which probably helped quite a lot.

    As you may be able garner by now, this was the greatest moment of my life. Now some might say, the law of large numbers applies here, and that what I achieved, was just randomness in action. Well fuck you! Given their explanations later, my ability to repeat this a few other times, and my ego, I come to the conclusion that this was not random.

    Wait... what was I saying. Oh yeah.

    Anyhow, because of this, I'd likely be unable to defeat the computer over and over again, as its ability to estimate my thought process (give it's simple like above), would be far greater as it can store a lot more of "if I go x he goes y after I went x and he went y and I went...", while also applying statistical analysis to it. Though, I do however think I'd be able to give it a good enough run for its money, that we'd diverge towards 50% win rate, as my thought process would devolve to random, in the long run.

    Ergo, could you beat a computer at Paper-Rock-Scissors? No, no I fucking couldn't, that's a stupid question. Next you'll be fucking asking me "Could you beat a computer at calculating and verifying primes?".

    --
    This is my footer. There are many like it, but this one is mine.
    1. Re:TL:DR; No. by WombatDeath · · Score: 4, Funny

      As you may be able garner by now, this was the greatest moment of my life.

      You know how sometimes you read things on the internet and you think "I'm almost certain that's a joke, but there is worrying shadow of doubt lurking at the back of my mind"?

  7. Re:Best strategy by N1AK · · Score: 3, Interesting

    You may have won in a specific case, that doesn't mean it is a winning strategy. Mathematically, a strategy based on pure randomness can't be more or less likely to win on average. Why? Because you can effectively ignore what the non-random player selects. There is a 1/3 chance you will randomly pick the same, 1/3 that you will randomly pick the one that beats them and 1/3 that you will pick the one that loses.

    Your theory about patterns is wrong. Even if they are incorrectly detecting a pattern it doesn't change the odds of your random choice winning/losing/drawing.

    A good strategy would mix random choices with selectively picked moves. Effectively you would need to double-guess what the computer system thinks your pattern is. Very good systems would then track if they are being tracked etc. Two 'perfect' systems would trade increasingly rare attempts to score, as they realise that the best reliable result they can hope for is a draw. This is because any winnning strategy must be based on predicting your opponents choices, the more you act upon your predictions the more a good opponent can learn about how your algorithm works and how to defeat it.

  8. Re:It allowed randomness to make your choices by j_sp_r · · Score: 3, Funny

    If your pattern is completely random, the opponent can easily win by favoring one.

    For example, random against always rock, rock wins 2 out of 3 times.

  9. Re:The Princess Bride by martyros · · Score: 3, Insightful

    The game was entirely random, but Westley won by cheating, he poisoned both cups.

    He wasn't cheating -- he never said only one was poisoned. He asked, "Where is the poison? The game ends when you choose and we both drink."

    If Vencini wasn't so full of himself, he might have reasoned that there were four possibilities:

    • Poison in the cup in front of me
    • Poison in the cup in front of the masked man
    • Poison in neither cup
    • Poison in both.

    Once you realize that, you can reason about it. Poison in neither cup would be compeltely pointless -- we both drink, and then we're in the same position we were before. Poison in one of the cups? Very risky. Essentially random, with a 50% chance of him dying. At any rate, it's certainly only a game of chance, not a game of wits. Poison in both cups? Seems pretty crazy -- then we both die. Ah -- but do we both die? What if he has an immunity or an antidote? Then if I fall for his trick, it's 100% -- I die no matter what I pick, and he lives. No, you bastard -- the poison is in both cups; I'm not drinking. I win the battle of wits by not falling for your trick.

    --

    TCP: Why the Internet is full of SYN.