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."

292 comments

  1. #winning! by alphatel · · Score: 1, Troll

    I for one, welcome our new rock-paper-scissors overlords.

    --
    When the foot seeks the place of the head, the line is crossed. Know your place. Keep your place. Be a shoe.
    1. 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.

    2. Re:#winning! by PopeRatzo · · Score: 2

      I then looked at others who were playing Farmville, made it feel like they were doing something productive for a change.

      You were wrong.

      --
      You are welcome on my lawn.
    3. Re:#winning! by Dachannien · · Score: 1

      How much can I pay to automatically win at RPS a hundred times?

    4. Re:#winning! by freakmn · · Score: 1

      Here's a way to do it. Feel free to send me a reasonable amount through paypal or USPS. 1. The first one is random, so use rock until you win it. If you lose, restart the game. 2. After the first rock, its logic kicks in, and the next 7 moves are: SSPPSRP 3. From here, it gets even easier. It gets into a loop of 6 moves: PSPSRR Keep doing the sequence in 3, and rack up the wins. Once you do it once, then your next move is always the same as the second move from the bottom of your history. When it reaches 100, it has a glitch and rolls over to the next line. Here's a screenshot of 113 wins, to show the bug. The 3 gets bumped down to the next line: http://img217.imageshack.us/f/rpso.jpg/

      --
      warning: This post is likely to contain gobs of dripping sarcasm. Consume at your own risk.
    5. Re:#winning! by freakmn · · Score: 1

      Apparently I can beat a computer, but can't beat HTML. Here's what that was supposed to look like:

      Here's a way to do it. Feel free to send me a reasonable amount through paypal or USPS.

      1. The first one is random, so use rock until you win it. If you lose, restart the game.
      2. After the first rock, its logic kicks in, and the next 7 moves are: SSPPSRP
      3. From here, it gets even easier. It gets into a loop of 6 moves: PSPSRR

      Keep doing the sequence in 3, and rack up the wins. Once you do it once, then your next move is always the same as the second move from the bottom of your history. When it reaches 100, it has a glitch and rolls over to the next line. Here's a screenshot of 113 wins, to show the bug. The 3 gets bumped down to the next line: http://img217.imageshack.us/f/rpso.jpg/

      --
      warning: This post is likely to contain gobs of dripping sarcasm. Consume at your own risk.
    6. Re:#winning! by Chatterton · · Score: 1

      Slight correction:

      • Starts with rock (reset if lose)
      • 6 moves: SSPPSR
      • 7 moves ad nauseum: PPSPSRR
    7. Re:#winning! by sietecuadrado · · Score: 1

      If only I had mod points. But the slight correction may help some people understand it better.

  2. 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 somersault · · Score: 2

      My score is 12 wins, 11 ties, 5 losses so far, starting to get bored. If you select what the computer "incorrectly predicted you would throw" it often lets you win, and other times I just choose randomly to fuck with it.

      --
      which is totally what she said
    4. 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.

    5. Re:I can beat the computer... by JackOfAllGeeks · · Score: 1

      Strictly speaking, I'm not sure it's possible for a human to "choose randomly," but maybe I'm over-thinking the phrase... And it's probably insignificant in practical terms, since "random" and "based on sufficiently-unknown processes" are probably close enough for most purposes.

    6. Re:I can beat the computer... by mwvdlee · · Score: 1

      Whether or not a human is capable of choosing randomly or not, atleast the computer isn't able to predict it.
      For me more wins than losses too. Purely by chance these numbers should be the same.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    7. Re:I can beat the computer... by JackOfAllGeeks · · Score: 1

      Purely by chance these numbers should be the same.

      That's probably the key -- although you might be close-to-random, the computer is using some kind of prediction algorithm which *isn't* random, so it's choices are going to be skewed based on previous experience.

    8. Re:I can beat the computer... by Enigma23 · · Score: 1

      My score is 12 wins, 11 ties, 5 losses so far...

      Great, now do it another 300 times to prove to a statistically significant level that you're got ESP. :)

      --
      Ceci n'est pas une .sig
    9. Re:I can beat the computer... by somersault · · Score: 1

      It's not ESP, it's just that the computer is adapted to common human selection traits based on the last few hands (seems it maybe only uses the last 4 hands as a reference for what you're going to do next according to the "see what the computer is thinking" tab). So if you act differently, then it will take thousands of games for it to catch up to your style. Maybe if I played against the "dumb" version it would do better as it may learn my "style" immediately. I'm not sure of my style exactly, but I was kind of trying to guess what the computer thought I would do, then doing something else.. like I would play the same hand 3 times in a row because generally nobody would be stupid enough to do that.

      --
      which is totally what she said
    10. Re:I can beat the computer... by JasterBobaMereel · · Score: 1

      It isn't, that's why the computer can beat you, it learns how you pick "random" numbers

      Humans are terrible at picking random numbers, computers can easily be trained to see the patterns in the pseudo random sequences, this has been done before many many times ...

      If you use a proper random number generator to pick your choice then it's average score will go to chance (1/3 wins 1/3 draws 1/3 losses)

      --
      Puteulanus fenestra mortis
    11. Re:I can beat the computer... by gatkinso · · Score: 2

      The moment you reach for the keyboard, the computer cuts off your fingers with some scissors, and hits you on the head with a rock.

      Then it prints a pic of you laying there, wasting a sheet of paper.

      --
      I am very small, utmostly microscopic.
    12. Re:I can beat the computer... by Broolucks · · Score: 1

      Truly random play has the same expected results against every single strategy.Think about it this way: no matter what the computer thinks you will do, if you play truly randomly, its odds of winning, losing or tying are all 1/3. If it did any better, it would be able to predict randomness, which is by definition impossible, and if it did any worse, then by inverting its strategy it would do better, and the same reasoning holds.

      Now, if you try to play randomly, and win in a statistically significant way, you are probably simply acting in a way that feels random to you, but is not random at all, and perhaps this happens to be a counter-strategy to the AI. That is, "playing randomly" for a human often might often involve picking the opposite of what he would have normally picked given the history of throws.

    13. Re:I can beat the computer... by rgbatduke · · Score: 1

      Right, so in this particular zero-sum game, the only way to be certain not to lose is to use a true-random (or as close as makes no difference) generator to select your moves, e.g. roll a die, 1 or 6 is rock, 2 or 5 is paper, 3 or 4 is scissors (first order correction for the weight of the pip cutouts). No matter what your opponent's strategy, this leads to a draw in the long run.

      To win, you have to observe your opponent's sequence for correlations and exploit any patterns you discover. Indeed, I've often thought about writing a NN to play the game on the latter basis, perhaps fuelled by a library of typical human correlation matrices. However, if the game is played mathematically, the player that uses any proactive strategy loses. Strategy basically means "nonrandom move patterns", and any systematic deviation from randomness can be detected against a background or null-hypothesis random play (in time) and exploited, any algorithms used to exploit apparently nonrandom play can be detected and exploited.

      rgb

      --
      Even when the experts all agree, they may well be mistaken. --- Bertrand Russell.
    14. Re:I can beat the computer... by CastrTroy · · Score: 1

      What if the human used a random number generator to guide their moves? What would the outcome be? You would expect that it would be 50/50, over enough trials, but maybe being truly random would throw the computer off it's game, and cause it to lose more than 50% of the time.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    15. Re:I can beat the computer... by Anonymous Coward · · Score: 0

      I'm not sure it's possible for a human to "choose randomly,"

      That's funny. I'm pretty sure it is impossible for a computer to be random as well. If it depends on milliseconds, I don't see how that is truly random.

    16. Re:I can beat the computer... by JackOfAllGeeks · · Score: 1

      Truly random play has the same expected results against every single strategy.Think about it this way: no matter what the computer thinks you will do, if you play truly randomly, its odds of winning, losing or tying are all 1/3. If it did any better, it would be able to predict randomness, which is by definition impossible, and if it did any worse, then by inverting its strategy it would do better, and the same reasoning holds.

      That makes sense, but it supposes that someone is playing randomly. If the premise is that humans can't play randomly, then you don't have "random vs strategy," you have pseudo-random vs pseudo-random, and it's possible/probable that the computer's choices are skewed. Which is kind of what you said in the second paragraph (and what I said above, if maybe not as elegantly as you).

    17. Re:I can beat the computer... by Anonymous Coward · · Score: 0

      Interestingly I was winning by a near 20 points lead. The computer had as many wins as draws. Then I was playing strategically, playing "safe." To make things more interesting I started to play "randomly" : that is not looking at what the computer was playing and not looking at whether I was loosing or winning each challenge. Interestingly the computer won all rounds except for a couple of draws (I didn't have a single win). ... does this tend to say that we have a very predictable "random" ?

      This reminds me of of the alt text at XKCD cartoon number 221. :-)

    18. Re:I can beat the computer... by nullifi · · Score: 1

      On novice I had 15 wins, 5 ties, and about 7 losses. I could usually predict what he would predict I would throw. Easy, right?

      I then tried it on Veteran, and my first 15 throws were all 15 ties. I kind of got bored then, saw what it was going to predict and won the next round. I claim I won that game.

    19. Re:I can beat the computer... by rtaylor · · Score: 1

      I tried that. Won by 10 points after 40 rounds.

      --
      Rod Taylor
    20. Re:I can beat the computer... by Fractal+Dice · · Score: 2

      I'm always tempted to use these types of games as algorithms to test the randomness of pi. Write out pi in base 3, use these for your choices and see if the computer can somehow eek out any trace of a pattern in trying to win the game.

    21. Re:I can beat the computer... by home-electro.com · · Score: 1

      Well that's not generally true. It would be true if the odds of computer choosing each of the 3 choices were equal, as those are for your random play. But if the computer is following some strategy, it might favor one of the choices more than others, thus biasing outcome from equal one way or another.

    22. Re:I can beat the computer... by home-electro.com · · Score: 1

      ever heard of dice?

    23. Re:I can beat the computer... by Ironhandx · · Score: 1

      Thats in the early stages, once you get to 40 games or so it starts throwing you for a loop on that. That said I'm @ 50-34-47.... winning by a slight hair.

    24. 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.

    25. Re:I can beat the computer... by Anonymous Coward · · Score: 1

      nuke sky tank helicopter myself.

      Is the 'myself' option the one that always loses? :P

    26. Re:I can beat the computer... by somersault · · Score: 1

      When I tried novice I actually did a lot worse, we were tied for wins, though with 2/3 as many ties as wins after about 50 games.. seems I was much better able to predict what the computer was predicting on the "veteran" mode.

      Like I said I think that is because veteran mode is adapted to a very generic play-style, which you and I don't seem to have since we're trying to anticipate what the computer is doing, rather than just following what we think are random or unpredictable patterns.

      --
      which is totally what she said
    27. Re:I can beat the computer... by somersault · · Score: 1

      That would be understandable if I were playing in the novice mode, but my original post was actually me playing in "veteran" mode. When I tried novice mode things were much more of a tie.. ended up being about 18 wins each, and 12 ties. It seems to me that in veteran mode the computer doesn't predict what you are going to do so much as what the average human would do..

      --
      which is totally what she said
    28. Re:I can beat the computer... by Anonymous Coward · · Score: 0

      eke = To get with great effort or strain.

      eek = a shout, often of surprise

    29. Re:I can beat the computer... by spud603 · · Score: 1

      You were lucky. A few posts back somebody explained why no matter what the strategy playing against uniform random will give you and expected outcome 1/3 win, 1/3 lose 1/3 tie.

    30. Re:I can beat the computer... by Kral_Blbec · · Score: 1

      I always thought eek was more of a mousey squeek.

    31. Re:I can beat the computer... by Ironhandx · · Score: 1

      Hmm, I just tried this and you're absolutely right. The veteran mode is actually easier.

      Thats pretty funny.

      Just goes to show that a learning AI will trump a pre-programmed one.

      Since humans are basically just I's without the A that learn, well....

    32. Re:I can beat the computer... by tompaulco · · Score: 1

      If the premise is that humans can't play randomly,
      Why not? Can't find any dice? Worst case is, if the computer is any good, it will be able to tell you the bias of your dice.

      --
      If you are not allowed to question your government then the government has answered your question.
    33. Re:I can beat the computer... by tompaulco · · Score: 1

      I'm pretty sure it is impossible for a computer to be random as well.
      It can be very close to random, but to really screw things up requires a human, or at least some outside intervention (probably caused by a human). A game between a human and a computer can be almost infinitely random, as you can reseed the random number generator based on the amount of time that the human takes to respond.In fact, if you allow unlimited response time, then it is truly random.

      --
      If you are not allowed to question your government then the government has answered your question.
    34. Re:I can beat the computer... by JackOfAllGeeks · · Score: 1

      Why not? Because that was the premise. If you want to introduce dice to "ensure" randomness that's fine, but it wasn't really the question at hand. And then people will start questioning whether you are playing the game/beating the computer.

    35. Re:I can beat the computer... by tlhIngan · · Score: 1

      (first order correction for the weight of the pip cutouts).

      Any good game store will sell casino-quality dice that don't need pip cutout compensation because they're evenly weighted (the pips are filled in). They usually come in pairs - the pips of one filled by plastic of the other color. They're also sharp edged (casinos replace them when the edge wears down),

      Speciality gaming stores will also sell calibrated dice which are not only filled in, but are weighed and their center of mass / center of gravity verified. Maybe even squareness, too.

    36. Re:I can beat the computer... by somersault · · Score: 1

      I suppose this kind of explains why we apparently become less able to learn new things as we get older.. if you try to apply all of your experience/assumptions to new situations then you can end up with poorer performance than if you just acted like you don't know anything.

      --
      which is totally what she said
    37. Re:I can beat the computer... by Fractal+Dice · · Score: 2

      I have altered the language. Pray I do not alter it further.

    38. Re:I can beat the computer... by tempest69 · · Score: 1

      Just pick your favorite irrational number in base 3, and that should be enough to muck with a simple minded machine. heck 3.14159265358979323846264338... you can arbitrarily convert digits to throws, and skip some number to prevent bias so a zero is simply a move to the next number in the list. This of course requires some advanced memorization or a list in front of you. Of course having said that, if a person researches you, then you need to use some strange irrational, like sqrt(69105) of course not actually 69105 as that is number a geek who would do that sort of thing might choose. Of course by the time your that paranoid you should consider professional help. Or be a middle east dictator, your choice.

    39. Re:I can beat the computer... by Frnknstn · · Score: 1

      Woman beats baby? What kind of sick game is that?

      --
      If it's in you sig, it's in your post.
    40. Re:I can beat the computer... by Arancaytar · · Score: 1

      Only if the computer is also playing randomly. If the computer's strategy presumes a pattern or bias where there is none, it might actually lose to a random player. For example, non-random humans often have a bias against repetition. The computer might falsely guess that repeating a choice a second or third time is less likely than a different one, when they're equally probable.

    41. Re:I can beat the computer... by Volguus+Zildrohar · · Score: 1

      One that takes discipline.

      *rimshot* ...

      *gunshot*

      --
      When confronted with one problem, some think "I'll use recursion". Now they are confronted with one problem.
    42. Re:I can beat the computer... by barrtender · · Score: 1
      No. I would go more in-depth to explain why you're wrong but someone posted in the thread right above here and it explains nicely:

      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.

      Broolucks (1978922) http://games.slashdot.org/comments.pl?sid=2028950&cid=35430776

    43. Re:I can beat the computer... by Sarten-X · · Score: 1

      That is the first time in many years I've found such a comment funny. Well played!

      --
      You do not have a moral or legal right to do absolutely anything you want.
    44. Re:I can beat the computer... by smellotron · · Score: 1

      Why not? Can't find any dice? Worst case is, if the computer is any good, it will be able to tell you the bias of your dice.

      I don't need a computer to tell that I'll never make that saving throw...

    45. Re:I can beat the computer... by Anonymous Coward · · Score: 0

      Oooh, you smart person, you!

    46. Re:I can beat the computer... by JasterBobaMereel · · Score: 1

      That would do nicely ....

      --
      Puteulanus fenestra mortis
    47. Re:I can beat the computer... by home-electro.com · · Score: 1

      I see, you are right

  3. Rock beats paper by BrunBoot13 · · Score: 0

    I've never been comfortable with the idea that paper can somehow beat rock: http://www.cslacker.com/images/funny/signs/billboards/paper_vs_rock/. Also, there are strategies for winning the game consistently: http://i.imgur.com/F2r3V.jpg.

    --
    I understand that English is a living language, but I object to changes arising merely from repeated errors.
    1. Re:Rock beats paper by digitig · · Score: 1

      Yes, you can win consistently if you can apply strategies like "counter paper with scissors", which is the sort of strategy that second article gives..

      --
      Quidnam Latine loqui modo coepi?
  4. 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

    1. Re:First paper, then scissors, then rock by Neil+Boekend · · Score: 2

      If you start by cutting the ethernet cable it can't cry out for help.

      --
      Well, I might have a way, but it only works on a semi spherical planet in a vacuum.
    2. Re:First paper, then scissors, then rock by jafac · · Score: 1

      naw, the rock is silicon.

      --

      These are my friends, See how they glisten. See this one shine, how he smiles in the light.
  5. Yes by TimmyRt · · Score: 3, Funny

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

    1. Re:Yes by Anonymous Coward · · Score: 0

      The first game creamed me at 1-4-11, I was floored.

      I played again, this time making the opposite choice to my first guess,

      I'm at 8-4-0. I guess you can take advantage of not being random.

    2. Re:Yes by CrackedButter · · Score: 1

      Stop playing on novice and come and get creamed with the Viet Cong mode.

    3. Re:Yes by Anonymous Coward · · Score: 0

      I stopped at 64-64-64

  6. Well known by Anonymous Coward · · Score: 0

    This is a well-known academic exercice. As an example, the Linux Mag France published such code in March 2004.

  7. confused by mattiyeh · · Score: 0

    NYTimes = the new candystand?

  8. This game is random , you can't outsmart someone by Viol8 · · Score: 1

    Just keep making purely random choices and the computer can only ever draw.

  9. Maximise your chances by fatphil · · Score: 1

    Just use iocaine powder against it
    http://www.ofb.net/~egnor/iocaine.html

    --
    Also FatPhil on SoylentNews, id 863
    1. Re:Maximise your chances by dingen · · Score: 1

      I can't get GCC to compile his code :'(

      --
      Pretty good is actually pretty bad.
    2. Re:Maximise your chances by dingen · · Score: 1

      Nevermind, I get it now.

      --
      Pretty good is actually pretty bad.
  10. more interesting version would be by Anonymous Coward · · Score: 0

    rock-paper-scissors-lizard-spock!

    and then we always tie at 'spock' :)

  11. Obligatory Simpsons by antifoidulus · · Score: 1

    Good ol' rock, nothing beats it.

  12. 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. -
  13. Ob. Simpsons: by david@ecsd.com · · Score: 2
    Lisa: Poor predictable Bart, always chooses rock.

    Bart: Good ol' rock, nothing beats that!

  14. green eggs n ham .. by Anonymous Coward · · Score: 0

    well, at least they're not wasting time on any pointless games :)

  15. This will not end well..... by Dawayne409 · · Score: 1

    Sure, first its a little R.P.S. with our computer, then maybe freeze tag with our robot pals. But what are you going to do when you catch your child playing doctor with your housekeeper 3000 cyborg? This needs to end.

    --
    "What this country needs now is a drink." -FDR
  16. Basically... by Mr2cents · · Score: 1

    So, it is a computer version of Derren Brown?

    --
    "It's too bad that stupidity isn't painful." - Anton LaVey
  17. Best strategy by mseeger · · Score: 1

    The best strategy is:

    a) You roll a dice (6 sides) that only you can see
    b) 1-2 Rock, 3-4 Scissor, 5-6 Paper

    No Watson can beat that one...

    CU, Martin

    1. Re:Best strategy by SoVeryTired · · Score: 1

      On the other hand, using this method, you can only ever draw with any strategy - including rock-rock-rock-rock-....
      With this in mind, is it really the best strategy?

      --
      Slashdot: news for Apple. Stuff that Apple.
    2. Re:Best strategy by zero.kalvin · · Score: 1

      Yes! I just ran a random number generator in the background, and played depending the result. I beat the machine, because the machine is not random, it do what people do. So if I was playing against someone who is not random, i will beat him using this method because this person will see patterns where there is none.

    3. Re:Best strategy by mseeger · · Score: 1

      Choosing your move on random is mathematically proven to be the best strategy in this game. Since this game has no strategy to guarantee winning, the best strategy to play aims for not loosing.

      This Rock-Paper-Scissor game is typically game No. 1 or 2 studied within game theory (part of Operations Research).

      CU, Martin

    4. Re:Best strategy by Eagleshadow · · Score: 1

      lol! I came to the same conclusion and did exactly the same thing few minutes ago, totally owned the computer :D score: 8:8:2, here is the proof! http://dl.dropbox.com/u/5293445/Capture_735.png

    5. 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.

    6. Re:Best strategy by dingen · · Score: 1

      That only works when the opponent does the same. If the opponent displays certain patterns in play however, it is better to analyze these patterns and use a strategy to counter the other player.

      --
      Pretty good is actually pretty bad.
    7. Re:Best strategy by mwvdlee · · Score: 1

      After exactly one hundred human-random games: 36/29/35. Not much intelligence going on on either side ;)
      FWIW, the strategy the computer uses should be easier to manipulate than the "strategy" of a human player, since it is far more deterministic.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    8. Re:Best strategy by Anonymous Coward · · Score: 0

      It is even true in the framework of game theory, if you assume that the opponent is not smart enough to use the best possible mixed strategy, or doesn't have access to a source of random numbers. With that restriction it is no longer a game theory 101 problem, though.

    9. Re:Best strategy by Anonymous Coward · · Score: 0

      The flaw is in thinking that there is a pure random number generator.

      In reality, the GP was using a pseudo-random number generator. The truth is, there is a PATTERN to the GP's choices... it's just very hard to detect. If I knew the code behind the GP's generator, I could have a competing strategy that could win 100% of the time.

      The best strategy is therefore a TRUE random number generator. Creating a perfect predicting machine will trend towards being a TRUE random number generator.

      I could type a whole lot more on the topic... it's very interesting... but I'll try to avoid tl;dr

    10. Re:Best strategy by Anonymous Coward · · Score: 0

      I figured that out as well -- if you play randomly, you force the case turnout for the opponent to be also random, which completely negates their strategy. Just like thermonuclear war, the only way to win is not to play. Or "There is no spoon." Or "resistance is futile." Whatever movie quote you like best. The only way that RPS is actually a "game" is if both players agree to play rationally, and there is no penalty for irrational play, since the win/loss record does not affect one's choices in future tests, given a large enough series (unlike, say, poker, where an irrational strategy may ultimately lose out if the player becomes short-stacked).

    11. Re:Best strategy by Thing+1 · · Score: 1

      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.

      Reminds me of WOPR re: thermonuclear war: "the only winning move is not to play."

      --
      I feel fantastic, and I'm still alive.
    12. Re:Best strategy by jgtg32a · · Score: 1

      Make sure they are casino dice, most common dice aren't "perfect"

    13. Re:Best strategy by Anonymous Coward · · Score: 0

      so you're still better off just choosing randomly

    14. Re:Best strategy by TexVex · · Score: 1

      I just ran a random number generator in the background, and played depending the result. I beat the machine, because the machine is not random, it do what people do.

      There is no causal relationship between playing randomly and winning. If you increase your sample size enough, you will find that you can win only about half your games playing that way.

      When either or both contestants throw randomly in ro-sham-bo, the result is random. Think about it. Randomness is unpredictable. So it doesn't matter whether you strategize against it or not. Your predictions will be wrong as often as they are right. Against a random throw, it doesn't matter if you throw rock every time or try to predict the random throw. Your predictions are meaningless; you can't WIN more often than half the time against a truly random opponent but that means you also can't LOSE more often than half the time.

      --
      Fun with Anagarams! LADS HOST, SHALT DOS. HAS DOLTS. AD SLOTHS, HATS SOLD. ASS HO, LTD.
    15. Re:Best strategy by zero.kalvin · · Score: 1

      I forgot about that! I was more focused on the computer following non-existence patterns , thinking it will ruin it chance of beating me. However going random will force the other player to go random as well(implicitly), Hence resulting in an overall tie.

    16. Re:Best strategy by Anonymous Coward · · Score: 0

      Mersenne Twistor - Good luck!

    17. Re:Best strategy by russotto · · Score: 1

      The best strategy is to run your own copy of the computer code with the same algorithm and data; you can then beat it every time unless it has a true random element.

  18. Re:This game is random , you can't outsmart someon by SoVeryTired · · Score: 1

    I guess the point is that people tend to deviate from this strategy and the computer can take advantage of those deviations.

    I would be very interested to know how the learning algorithm works. Given that the program is taking advantage of your deviations from the 1/3-1/3-1/3 strategy, it follows that the computer is itself deviating from that strategy. Therefore there should be some strategy that beats the computer on average.

    I guess you could continue this reasoning ad infinitum, but I would say that the meta-meta-meta strategies would converge to 1/3-1/3-1/3 pretty quickly.

    --
    Slashdot: news for Apple. Stuff that Apple.
  19. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    The odd thing is, I did keep making random choices, and the computer is still winning by a large margin. Is there something suspicious going on here?

  20. Is the Terminator Far Behind by thebian · · Score: 1

    I understand that a small but growing number of people are heading toward the hills in Montana and Idaho to prepare for the human revolution against the machines.

    1. Re:Is the Terminator Far Behind by Neil+Boekend · · Score: 1

      Since this information is brought to me by a machine I am disinclined to believe it. You are just trying to get all the geeks there to destroy us with the first nuclear balst so no-one can write new viruses for you!

      --
      Well, I might have a way, but it only works on a semi spherical planet in a vacuum.
    2. Re:Is the Terminator Far Behind by nowen2dot · · Score: 1

      I understand that a small but growing number of people are heading toward the hills in Montana and Idaho to prepare for the human revolution against the machines.

      Yeah, but they've been doing that since the horseless carriage!

      --
      I've had a perfectly wonderful evening. But this wasn't it. -- Groucho Marx
  21. I spent the last few years building up... by Eunuchswear · · Score: 1

    up an immunity to iocane powder.

    --
    Watch this Heartland Institute video
  22. Not very good by Arancaytar · · Score: 1

    I'm not using a random generator to pick my moves, so the veteran algorithm should be able to predict what I'm thinking at least slightly. Instead, it gets it wrong more often than not, and after 20 rounds I led 6:4 with 10 ties. Maybe it'll get better after I play a while.

    1. Re:Not very good by WinstonWolfIT · · Score: 1

      You obviously know nothing about variability. Don't write a random() function for any rtl for nasa kthxbai.

    2. Re:Not very good by bunratty · · Score: 1

      After a short number of rounds in any game involving chance, a player at a disadvantage can be ahead. The more rounds you play, the lower the chance that the player at a disadvantage is ahead. Understanding this is critical to understanding how Las Vegas makes money, or how scientific experiments are performed.

      --
      What a fool believes, he sees, no wise man has the power to reason away.
    3. Re:Not very good by MoeDrippins · · Score: 1

      Even worse, I used an "algorithm" to play (which is to say, a pattern), and I had a 11:2:7 (win:lose:draw) record. This was also on 'veteran'.

      --
      Before you design for reuse, make sure to design it for use.
  23. computer RoShamBo competion by kwikrick · · Score: 1

    Beating a human player at rock-paper-scissor is easy. Computers playing against each other is much more fun. There used to be a computer RoShamBo (same game, different name) competition, see: http://webdocs.cs.ualberta.ca/~darse/rsbpc.html

    --
    assignment != equality != identity
    1. Re:computer RoShamBo competion by Thing+1 · · Score: 1

      Sometimes I want to kick my computer in the nuts too.

      --
      I feel fantastic, and I'm still alive.
  24. Re:This game is random , you can't outsmart someon by ddxexex · · Score: 2

    Exactly. They aren't random at all. Laugh if you want but there is actually a RPS strategy guide. Its mostly determining what kind of person your opponent is and knowing what that person is likely to pick from what they know of you. it's much more like the battle of wits in The Princess Bride than random guessing.

  25. Predictable by Anonymous Coward · · Score: 0

    The Computer does what the average human would do based on the last 5 throws. If you can guess that, you can guess what the computer will do. The tricky part is that you're predicting 2 entities instead of one. Once you shift you train of Rock, Paper & Scissors thoughts to that method - it seems alot more favorable.

  26. Isn't this how games like Mortal Kombat work? by Anonymous Coward · · Score: 1

    I recall reading years ago that most fight games work this way. They take the players controller input and build up a statistical layout of what the player is likely to do next.

  27. It's already obsolete by Israfels · · Score: 2

    Us nerds have already moved on to Rock-Paper-Scissors-Spock-Lizard a long time ago.
    Been there, done that, got the shirt.

  28. Help me statistician your my only hope ... by stuckinarut · · Score: 1

    Playing in veteran mode when I loose, and then stubbornly refuse to change my choice, I'll constantly loose as the computer then 'correctly predicts I would play scissors' or whatever losing choice I've made repeatedly. Surely at some point it should think I won't be that dumb any more and I'll change my choice so shouldn't it change it's choice at some point too? Why does it always stick with it's winning choice? How many of the previous 200,000 rounds would have over twenty consecutive choices of scissors for it to always choose rock. Having "convinced" the computer I'll play scissors every time I can then win when I eventually choose paper. I can't get more than three consecutive ties though. For some reason I'm reminded of Derren Brown recording for hours on end until he got twenty consecutive heads in a coin toss in one take.

    1. Re:Help me statistician your my only hope ... by TheThiefMaster · · Score: 1

      It only looks at the last 4. Any run longer than 4 with you both choosing the same should just continue like that until YOU choose something different.

    2. Re:Help me statistician your my only hope ... by Anonymous Coward · · Score: 0

      Except Derren Brown didn't, he just used a two headed coin and *claimed* that he had done it the hard way. I watched it is slow motion and the tails didn't appear in a single frame.

    3. Re:Help me statistician your my only hope ... by Anonymous Coward · · Score: 0

      Because it wins with it. You are losing much more rounds than the system does, and as there is no way of predicting your choice after a long run of only X, just keeping COUNTER(X) will only allow you to gain one single round.

    4. Re:Help me statistician your my only hope ... by zAPPzAPP · · Score: 1

      It searches for patterns.
      20 scissors in a row is a pretty clear and obvious pattern.

  29. A little presumptuous by Anonymous Coward · · Score: 0

    "pretty much known by everyone on the planet by now".

    USA != planet. I grew up in India. Never heard of the game until I came to US. And actually I still don't know how it is played.

    1. Re:A little presumptuous by Errol+backfiring · · Score: 1

      Same here. Never heard of it. But then, Europe is hardly part of America's "planet".

      --
      Nae king! Nae laird! Nae yurrupiean pressedent! We willna be fooled again!
    2. Re:A little presumptuous by dingen · · Score: 1

      And actually I still don't know how it is played.

      Two people choose either rock, paper or scissors. Paper beats rock. Rock defeats scissors. Scissors defeat paper. The player who defeats the other player wins.

      --
      Pretty good is actually pretty bad.
    3. Re:A little presumptuous by dingen · · Score: 1

      I'm from Europe as well and used to play this game as a child.

      --
      Pretty good is actually pretty bad.
    4. Re:A little presumptuous by grumbel · · Score: 1

      The game is well known in Germany at least and I would be surprised when almost every culture had some analog to it, as it is based around a core concept of game design, names and items might differ, but the rules are likely the same.

  30. Re:This game is random , you can't outsmart someon by Chris+Mattern · · Score: 1

    Except that you're not capable of making purely random choices. The human brain isn't wired for it.

  31. Re:This game is random , you can't outsmart someon by apharov · · Score: 1

    It's easily possible to do better than random: just decide what would your natural throw at a given point, and then actually do the throw that feels worst to you. With a quick test it seemed to work, got something like 5:4 win ratio with lots of ties too.

  32. First draw might be biased? by Anonymous Coward · · Score: 0

    The first draw seems to be a bit biased for the computer.
    I tried randomly selecting (eyes closed, moved mouse around) and I could only win 3 out of 20. And yes, I reloaded the page between. I think statistically speaking should have been something like 6 or 7 out of 20.

  33. Re:This game is random , you can't outsmart someon by ArAgost · · Score: 1

    They can be, for example I can decide by dice throw.

  34. Paper Rules by MathiasRav · · Score: 2

    For an intro (and I mean intro) course in Computer Science at uni, we were assigned to write a Java client in a game called Paper Rules. Establish TCP connection, wait for the master server to find an opponent (another client) for you, and then repeatedly send either ROCK, PAPER or SCISSORS to the server and read the result of the match. To make it interesting, the rules were enhanced so winning a round yielded 1 point, losing -1 point, except when paper won, in which case 2 points were assigned to the winner and -2 to the loser. Our task was to write an "AI" to outsmart the other students' AI.

    I wrote a simple algorithm that kept track of the statistics for each of the 18 combinations of [my choice in round n, round n result, opponent's choice in round n+1] and chose based on what the opponent had picked the most in the past. In a match, the winner was declared after 1000 rounds.

    Of course, the so-called PaperServer was a <1000-SLOC inefficient by-students-for-students Java one-system-thread-per-connection server running in a Java VM inside a Java VM (yes, really - an IDE called BlueJ) on a terribly underpowered virtual server, so it didn't last long, and anything educational was lost on us that day. Fun times.

  35. Re:This game is random , you can't outsmart someon by Tukz · · Score: 1

    Then it's not your choice.

    --
    - Don't do what I do, it's probably not healthy nor safe. -
  36. Re:This game is random , you can't outsmart someon by heikkile · · Score: 1

    I did this many years ago. No need for fancy AI, a simple Markov chain was enough to beat the people I tried with. Today I would make it adapt the chain length dynamically, trying with different lengths and keeping track of their performance. But even a 3-level chain (if I remember right) beat humans consitently in about 50 games, and the random number generator of that old machine in less than 10000 games. But it was probably not a good random number thing...

    --

    In Murphy We Turst

  37. 100-106-125 on vet by futureist · · Score: 1

    yea i couldn't get evens. print screen saved.

  38. oh yeah by Anonymous Coward · · Score: 0

    60% of the time... all the time.

  39. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    I think there could be ways to get random enough.

    If there is time, one could first pick a number(n) between 7 and 23 (or something else), think of a song, pick the n:th letter, convert that letter into a number by some not too complicated algorithm to come up with a letter in another song, to use that letter for a number to pick one of all the memorized songs. Do this again with another starting number and song to pick a number. Use that number to pick a letter from the song selected earlier. Convert that letter to a number. Repeat to get another number. Use one of the numbers to choose a song and the other to get a letter from that song. Repeat several times to get a string of letters. Use some algorithm to convert each letter into either a 1, 2 or 3. Use aforementioned ways to select a slice of the string of numbers. Start over to get a number to use to find the index in the string of numbers. Or something like that.

  40. Re:This game is random , you can't outsmart someon by somersault · · Score: 1

    Try using a random number generator instead of what you think is you being random. It seems to use the last 4 moves you made as a predictor of your next move, though I was using its moves to influence my own.

    --
    which is totally what she said
  41. 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"?

    2. Re:TL:DR; No. by definate · · Score: 1

      LOL That worry is well founded. While said in jest, I am proud of it, and I do get quite a lot of mileage out of this story.

      So, I know it isn't a worthwhile accomplishment, and thats why the story is written as if I was doing something absolutely intense, kind of to poke fun at how pleased I am with that accomplishment.

      Further more, it was awesome, and you can't take that from me! You're not the boss of me, and you're not my real dad!

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

      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?".

      Beating "a computer" could be difficult. But beating a computer that plays based on statistics how human opponents play... Totally possible, if you can estimate on what level most people in that statistic play.

    4. Re:TL:DR; No. by definate · · Score: 1

      Given it learns, might have a greater weight on the most recent rounds, than older rounds, then this would be extremely hard.

      Also, ever done statistics in your head?

      I don't see that lasting long if we have to do it in our heads. If we can also do calculations on a computer, then its hardly us vs the computer, more 1 computer vs another computer.

      --
      This is my footer. There are many like it, but this one is mine.
    5. Re:TL:DR; No. by Neil+Boekend · · Score: 1

      Reply at your signature: Look at Somalia. The lack of government and law enforcement has created a chaos. People are being murdered for looking at other people the wrong way. Preventing that is the good government does.

      --
      Well, I might have a way, but it only works on a semi spherical planet in a vacuum.
    6. Re:TL:DR; No. by Eivind · · Score: 1

      This one is fairly simple. It keeps the last 200K rounds, and then to make a prediction is searches these for occurences where both human and computer has played the same 4 things in sequence. It then predicts the most common choice for the human, and responds based on that.

      i.e. if last-4-rounds was human: RPSR and computer SPRR it searches the last 200K rounds to find that precise situation, yielding on the average 781 times before that that *precise* situation has occured. It then predicts what the human most commonly did as next-step.

      You can beat this, if you're aware of what humans most commonly do in *some* situations, and deliberately do the opposite thing, while playing randomly (toss dice!) when you -dont- recognize the situation.

      Infact you could memorise the veterans response: there's only 256 possible states.

    7. Re:TL:DR; No. by lahvak · · Score: 1

      ... so I clearly cannot choose the wine in front of me!

      --
      AccountKiller
    8. Re:TL:DR; No. by Anonymous Coward · · Score: 0

      See also k-level thinking
      http://mathworld.wolfram.com/Level-kThinking.html

    9. Re:TL:DR; No. by PhunkySchtuff · · Score: 1

      Charlie Sheen, is that you?

    10. Re:TL:DR; No. by Anonymous Coward · · Score: 0

      Actually I just beat the computer(On "Expert") using basically the same logic you just described, however I did it before reading your post and I started by expecting the computer to think like me, because I'm a CS *student* and since it's on the new york times website and not some A.I. contest I expected the programming to be equally poor to how it would work if I made it. In the end I lost 6, won 19 and tied 13.

          Or, translated to Vencini, I got some wins, followed by an unlikely number of ties as I tried to defeat myself who was was trying to defeat himself which was me. This is causing ties I spoke to myself/my competitor. Then, I just stepped ahead to choose whatever I certainly wouldn't choose, which is what I did choose, so I could not choose that. But now that I couldn't choose that I most certainly wouldn't choose that so I did choose that very choice. This resulted in a further string of wins.

    11. Re:TL:DR; No. by Anonymous Coward · · Score: 0

      I generated a random set of rock/paper/scissors using my computer.

          Then I played against the Novice setting. And I won: me=20 vs it=16 w/ 10 ties after 46 rounds.
          Then I played against the Veteran setting. It won: me=14 vs it=16 w/ 16 ties after 46 rounds. (close)

      I regenerated a new random seed between the sets. The seed was based upon my computer's clock.

      I do know that having done a lot of work with random sets generated by computers that short sets (these are short) are not the most random. In fact, even with sets of millions things are still only so-so. This thing is able to predict. It is pretty simple really. However, if I could truly generate a random set then we ought to be about tied.

    12. Re:TL:DR; No. by definate · · Score: 1

      WINNING!

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

      Somalia is a bad example for your position. There is more government meddling in Somalia than in the average first-world state. To begin with you have the native Somalian government, distributed among the various tribal elders, which effectively form a number of tiny territories each ruled by its own mostly-hereditary dictator. On top of that you have the attempts of various "civilized" nations to set up some sort of centralized government they can relate to, against the wishes of those they would rule over, with varying degrees of failure. Each attempt further destabilizes the region. Finally you have the outright criminals and/or warlords in the region who attempt to rule over various areas in exactly the same manner as a government would, but without the false cover of "legitimacy" which the tribal elders and well-meaning outside nations can claim.

      Somalia is a mess—on that much we can agree. However, they aren't exactly suffering from a lack of government; too many governments would be closer to the truth. A single, strong central government might be able to bring some stability to the region by putting an end to the existing chaotic interference of multiple types and levels of government, internal and external, but it would be even better to put an end to that interference, and all other forms of aggression, without allowing a new government to take its place.

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    14. Re:TL:DR; No. by sietecuadrado · · Score: 1

      Kind of like my stories of being 3rd grade Scrabble champion and 7th grade spelling bee champion. Yeah... I'm a pretty big deal.

  42. Yes. by Maxx169 · · Score: 1

    Yes, easily. Play: Rock Paper, Paper Scissors, Scissors, Scissors repeat. I'm currently sitting at: My 38 wins, 49 ties and Veteran 3 wins... Silly computer...

  43. Re:This game is random , you can't outsmart someon by 91degrees · · Score: 1

    How often were you making the same choice 3 times in a row? This happens surprisingly frequently in real life.

  44. play by futureist · · Score: 1

    you can get it to be picky about when it breaks out of ties and in what direction, i need a few ties before a win or a loss.

  45. I can say - YES by devaudio · · Score: 1

    I am 25-10-5 vs the computer right now. It doesn't seem to be a great algorithm - i picked veteran to start out, and it seem to favor rock a lot more than the others

  46. Re:This game is random , you can't outsmart someon by JackOfAllGeeks · · Score: 1

    There's still only a 1-in-3 chance that you'd beat the computer. Hardly game-breaking.

  47. Re:This game is random , you can't outsmart someon by N1AK · · Score: 1

    I can let the fact your naive enough to think humans are good at making genuinely random (or even pseudo-random) decisions go. What I don't understand is why did you bother posting, you're evidently not informed on the subject or experienced in a related field. Your post, at best, wastes other peoples time and, at worst, misleads others.

  48. Sheldon by yabba-dabba-do · · Score: 1

    But can it play Rock Paper Scissors Lizard Spock?

  49. i've got old bash scripts with better odds no ai by nwmann · · Score: 0

    lol 9 consecutive wins against it 21:11:9 i think it was easier for me to subconsciously learn what the computer thought it was learning about me and plan ahead than it is for the computer to learn from me as it's always a few moves behind.

  50. Sometime the learning is quite straightforward by macs4all · · Score: 2

    Back in my youth, programming in BASIC and 6502 assembler on the Apple ][, I wrote a "learning" game of "23 matches". The object of this 2-person game (in this case, human v. computer) is to avoid taking the last match. Each round, the player can take 1, 2 or 3 matches.

    Although written in about 100 lines of Woz's Integer BASIC, the learning algorithm was simplicity itself: Each round, the computer kept track of its moves (and only its moves) in a table that was indexed by how many matches were left (a 22-row by 3 column table). The table started out with all "zeros" in each of 3 X 22 "weighting" columns (1 column for each possible "move" at each point). If the computer won a round, it incremented the "weight" of each "choice" that was made as the "pile of matches" for that round dwindled. Conversely, if the computer lost a round, it decremented all the "weight" cells at the junctures of "how many left?" X "how many did I take?".

    And the algorithm was "predisposed" to "favor" the move that was the "most successful" at any given "how many left?" point.

    That was it. No statistical math. No deep AI. Nothing. Just sort of a "path of evolutionary success" that formed a kind of "groove" that guided the correct answer at any given point, without regard to the past moves in a round, nor with any "forward-looking" capability, either. Just stimulus-response.

    It was fascinating to watch just how quickly this algorithm "learned". During the first 5 or 6 rounds, it hardly ever won. By the 12th or 13th round, it was pretty hard to beat. By about the 20th round, it was no fun to play anymore, because it was simply unbeatable at that point, and had to be "lobotomized" (lose its "experience").

    And, just like those walking robotic "insects" that teach themselves to walk in a matter of minutes with only 2 simple rules (IIRC, standing up is better than laying down; and moving forward is better than standing still), this was a real eye-opener as to just how simple a "learning" algorithm can be, and still achieve results that are both impressive and effective.

    1. Re:Sometime the learning is quite straightforward by TerranFury · · Score: 1

      You might be interested to know that the algorithm you describe is pretty close to Q-learning, which actually is a staple in AI/robotics/etc. Also see the closely-related "Value Iteration" algorithm.

      I tend to be of the philosophy that the supposed differences between algorithms that "look ahead" and those that "learn" is just a matter of perspective: Both A* and Q-learning, for instance, can be viewed as "just" methods for computing the Bellman Value Function. (I'd say that, at base, about half of robotics, AI, and optimal control is about computing the Bellman Value Function. The other half is Bayes' Rule).

    2. Re:Sometime the learning is quite straightforward by Rigrig · · Score: 1

      That was it. No statistical math. No deep AI.

      "Always leave a multiple of four plus one" is hardly statistical math/deep AI.
      It was only unbeatable because you always let it go first, but at least it seems to have accomplished its task of being fun to program.

      --
      **TODO** [X] Steal someone elses sig.
    3. Re:Sometime the learning is quite straightforward by macs4all · · Score: 1

      You might be interested to know that the algorithm you describe is pretty close to Q-learning, which actually is a staple in AI/robotics/etc. Also see the closely-related "Value Iteration" algorithm.

      I tend to be of the philosophy that the supposed differences between algorithms that "look ahead" and those that "learn" is just a matter of perspective: Both A* and Q-learning, for instance, can be viewed as "just" methods for computing the Bellman Value Function. (I'd say that, at base, about half of robotics, AI, and optimal control is about computing the Bellman Value Function. The other half is Bayes' Rule).

      Interesting. I "discovered" that method completely independently, based on a line regarding IBM's early (1960's) efforts to "teach" a computer to recognize unbroken, natural speech (a skill that even the vaunted "Watson" seems not to even TRY, some 50 years later!). In the caption to the picture, it said something like "A technician teaches a computer at the IBM headquarters to recognize human speech. When the computer makes a mistake, the technician "punishes" it by pressing a button."

      That gave me the idea that "punishing" incorrect behavior AND "rewarding" correct behavior might be easily simulated in my game.

      What is even more interesting, and what I forgot to mention in my long-winded post, was that there IS a purely mathematical "solution" to the 23 matches game. In fact, there were already BASIC programs that used the formula (which involved something about the square-root of the remaining matches, IIRC). But I did not use any of that. Just the "reward/punishment training".

      Thanks for the info. Glad to see that at the ripe-old age of 22 (and completely self-taught in computer programming) I was in such good company!

    4. Re:Sometime the learning is quite straightforward by macs4all · · Score: 1

      That was it. No statistical math. No deep AI.

      "Always leave a multiple of four plus one" is hardly statistical math/deep AI. It was only unbeatable because you always let it go first, but at least it seems to have accomplished its task of being fun to program.

      Did I mention anything about letting it go first?

      I do not remember that being a constraint. I think I actually made it so that either player could start.

  51. Reminds me of a Commodore program by smchris · · Score: 1

    in some mag about 25 years ago. "Hit this key or that key." Algorithm just will have significant predictive success because people just don't do random.

    1. Re:Reminds me of a Commodore program by Anonymous Coward · · Score: 0

      Yes, I remember a very old program in BASIC that played this game using this very same techniques, back in 1986, published (here in Brazil) in a series of books called "INPUT". It was quite unbeatable after a while.

      http://www.datacassete.com.br/revistas/detail/Input-n-68/57.html
      (see page #10-17, sorry, portuguese only)

  52. It allowed randomness to make your choices by Shivetya · · Score: 1

    As in, instead of following your natural inclination you use an outside random event decide your next move you could keep the computer from establishing a pattern in your behavior. Like, using dice or basing your choice on single pull from a deck of cards. Otherwise I am quite sure it can establish a pattern regardless of what you do

    --
    * Winners compare their achievements to their goals, losers compare theirs to that of others.
    1. 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.

    2. Re:It allowed randomness to make your choices by coinreturn · · Score: 2

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

      Sounds like "New Math" to me. I suggest you run a simulation to verify just how wrong you are.

    3. Re:It allowed randomness to make your choices by Anonymous Coward · · Score: 0

      the thing is, its not using MY pattern against me, its using OTHER peoples patterns (200.000 of them).
      once you figure out a few of those patterns, you got him beat (or at least can win more then 1/3 of the time.)

      when i played it on advanced, first he won, then we tied a lot, then i started gaining on him.

    4. Re:It allowed randomness to make your choices by Anonymous Coward · · Score: 0

      Here's the thing -- your pattern can rely on feedback from the system itself. I won 56% of the time, and I did it not by following an outside pattern, but by predicting what the computer would predict I would do, and acting accordingly. I started with a 40% win rate or so, and started to figure out how it ticked, and turned things around. I probably could have gotten 60+ if I had kept going.

  53. next up... by Anonymous Coward · · Score: 0

    can you beat a computer at tic-tac-toe?!
    oh yeah, well can you beat a computer at tic-tac-toe on weed, man?!

  54. The Princess Bride by mangu · · Score: 1

    it's much more like the battle of wits in The Princess Bride than random guessing.

    Did you watch that movie? The game was entirely random, but Westley won by cheating, he poisoned both cups. You can't do that in RPS.

    1. Re:The Princess Bride by Enigma23 · · Score: 1

      Did you watch that movie? The game was entirely random, but Westley won by cheating, he poisoned both cups. You can't do that in RPS.

      Poison both cups before you start playing and make sure he drinks from his...

      --
      Ceci n'est pas une .sig
    2. 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.

    3. Re:The Princess Bride by Anonymous Coward · · Score: 0

      To be fair, he never mentioned that only one of the glasses would be poisoned. Poisoning both glasses was well within the stated rules.

      http://www.youtube.com/watch?v=f6wqKb8EUxI

    4. Re:The Princess Bride by Anonymous Coward · · Score: 0

      Did you watch that movie? The game was entirely random, but Westley won by cheating, he poisoned both cups. You can't do that in RPS.

      Sure you can. Pretend to play rock, then follow through by punching the other guy.

    5. Re:The Princess Bride by mangu · · Score: 1

      No, you bastard -- the 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.poison is in both cups; I'm not drinking. I win the battle of wits by not falling for your trick.

      "The battle of wits ends when you decide and we both drink" -- If Vencini hadn't drunk, the battle wouldn't have ended. By picking a poison to which he was immune, Westley cheated.

      But, of course, in a battle of wits cheating is to be expected. Like Snake Plissken playing by Bangkok rules.

    6. Re:The Princess Bride by Raenex · · Score: 1

      He wasn't cheating -- he never said only one was poisoned.

      Still cheating. It's massively deceptive to intentionally lead somebody on by trying to trick them with words based on common expectations.

    7. Re:The Princess Bride by Anonymous Coward · · Score: 0

      You keep using this word, "random." I don't think it means what you think it means.

    8. Re:The Princess Bride by martyros · · Score: 1

      Still cheating. It's massively deceptive to intentionally lead somebody on by trying to trick them with words based on common expectations.

      It was deceptive, absolutely. And in most contexts, I'd say that there's no moral difference between saying something which is strictly true but which you intend to be misleading and just lying.

      But I think in that situation -- a "battle of wits, for the princess, to the death", deception should be expected to be part of the rules. After all, Vencini himself used deception when he switched the cups. If he'd respected the intellect of his opponent, he'd have been on the lookout for exactly this kind of deception.

      I think Douglas Adams said it best, when a character in one of his novels says to another one: "You're a clever man, [Dirk Gently], I grant you that; but you make the same mistake a lot of clever people do of thinking everyone else is stupid."

      --

      TCP: Why the Internet is full of SYN.

    9. Re:The Princess Bride by Raenex · · Score: 1

      And in most contexts, I'd say that there's no moral difference between saying something which is strictly true but which you intend to be misleading and just lying.

      I'm glad you at least agree with this.

      But I think in that situation -- a "battle of wits, for the princess, to the death", deception should be expected to be part of the rules.

      It's arguable, but I still call it cheating. You can use your wits without deception.

      After all, Vencini himself used deception when he switched the cups.

      True, and you might call that cheating, too. However, I think proposing a rigged game was the greater cheat. It was a dishonorable (in my opinion) way to win.

    10. Re:The Princess Bride by ceswiedler · · Score: 2

      The other interesting thing about that scene is that Vizzini does his own clever trick. He switches the cups and waits to see if Wesley is comfortable drinking (what he thinks is) his cup. Since he is, and Vizzini has Wesley's original cup, he feels safe drinking it. Which is perfectly rational and a good way to beat the game if you assume there is poison in exactly one cup.

    11. Re:The Princess Bride by rayzat · · Score: 1

      You obviously don't play with Philly rules.

  55. Can You Beat a Computer At Rock-Paper-Scissors? by ludwigf · · Score: 1

    Yes.

    I played 100 rounds against the "veteran". End Score: 38 (wins) 35 (ties) 27 (computer). So can anyone get some statistically meaning out of that?

    1. Re:Can You Beat a Computer At Rock-Paper-Scissors? by Stenchwarrior · · Score: 1

      Statistically, you wasted 30 minutes of your life that you can never get back.

      --
      Loading...
  56. RPSLS by Anonymous Coward · · Score: 0

    I only play Rock, Paper, Scissors, Lizard, Spock you insensitive clod.

  57. Rock paper scissors lizard spock? by Ecuador · · Score: 1

    I mean, seriously, who plays the plain rock paper scissors any more? Plus, for the augmented game, a winning strategy for the computer is much easier: if player's http referrer is slashdot, always choose lizard to poison Spock..

    --
    Violence is the last refuge of the incompetent. Polar Scope Align for iOS
  58. Potentially, anyway by Anonymous Coward · · Score: 0

    If a pattern exists, it is possible that the algorithm used by the program will be be able to detect it. But that doesn't mean that the program has been written in such a way that it actually is able to detect any given pattern being used, let alone detect the correct pattern. And what if the strategy being used is a pattern of patterns? Would the machine be able to pick up on a change of strategies every Nth interation?

    For that matter, it's also possible that the program could falsely detect patterns where none exists. If one were to use a random number generator to determine moves, the computer may draw a false positive and project a pattern where none exists.

  59. worst? by Anonymous Coward · · Score: 0

    What was the worst moment of your life?

    1. Re:worst? by definate · · Score: 1

      The moment I read your comment.

      The second worst was when my uncle touched me, but I had repressed this until you posted your comment.

      THANKS ARSEHOLE!

      --
      This is my footer. There are many like it, but this one is mine.
  60. Re:This game is random , you can't outsmart someon by sourcerror · · Score: 1

    Sorrry, but it's bullshit, the winning strategy is randomness. (see Nash-equilibrium)

  61. No Good by The+Aethereal · · Score: 1

    Tied over 20 games...seems about what I would expect from a human.

  62. Re:This game is random , you can't outsmart someon by Olix · · Score: 1

    When I want to be 'random' I map successive digits of pi to whatever problem I am considering. (In this case, 1-3: rock, 4-6: paper, 7-9: scissors.)

    Apparently memorising hundreds of those as a kid wasn't worthless after all!

  63. Re:This game is random , you can't outsmart someon by bcmm · · Score: 1

    I can fairly reliably beat some people. You see, a human's idea of "random" can be pretty predictable. People's reactions can be quite amusing; especially if they "know" it's a random game.

    Once they figure it out and start playing by predicting my moves instead of trying to behave randomly, the score tends to even out. Also, it becomes quite an interesting game.

    --
    # cat /dev/mem | strings | grep -i llama
    Damn, my RAM is full of llamas.
  64. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    Ask someone to pick a random number and 99% of the population won't use more than two digits.

    It may be the "winning strategy" in a "perfect economic world of rational humans" but here in the real world, people aren't random. Or rational.

  65. Human has the advantage by Anonymous Coward · · Score: 0

    If one were careful it should be possible to predict what the computer will pick knowing that its choice is purely based on your previous choices. If one could determine the algorithm used (assuming it does not incorporate a random value) it should be possible to win 100% of the time.

    1. Re:Human has the advantage by nhaehnle · · Score: 1

      Their algorithm for the Novice player basically looks at your last four throws, and then looks at the history of how often those last four throws were followed by each of rock, paper, scissors, and picks the corresponding counter. It is trivial to fool this, with the following Python snippet (note that the Python code will just pick randomly when there is no clear winner):

      import random
      freq = [0] * 3*3*3*3*3
      history = 0
      while True:
          raw_input('')
          history = history * 3
          h = freq[history:history+3]
          print h
          choice = random.choice([(j+2)%3 for j in range(3) if h[j] == max(h)])
          print 'Throw', ['rock', 'paper', 'scissors'][choice]
          history = history + choice
          freq[history] += 1
          history = history % 81

      The Veteran computer player uses a different strategy, based on some database. Once you've inferred the database from its responses, beating it should be trivial, but of course it would take relatively long to read out the entire database.

  66. Erratia... by Anonymous Coward · · Score: 0

    I won!

    It lacks intuition... Avoid predictability!

  67. Re:This game is random , you can't outsmart someon by donscarletti · · Score: 1

    I can consistently beat my girlfriend in RPS, maybe 70% of the time. The trick it to focus on what she thinks I am thinking and be one step ahead. The reason I win is that my girlfriend has a research masters degree in a humanities subject and the game requires both logic and empathy; the humanities focus precludes logic and postgraduate education precludes empathy. It is like beating Steven Hawking in an arm wrestling match.

    --
    When Argumentum ad Hominem falls short, try Argumentum ad Matrem
  68. Re:This game is random , you can't outsmart someon by Timmmm · · Score: 1

    Untrue. Nash equilibria aren't 'winning strategies' (see prisoner's dilemma). Randomness is an unbeatable strategy, but the best strategy depends on what your opponent does.

    If they play completely randomly, you can't do any better than also playing completely randomly. But if there is any non-randomness in their actions you can definitely do better. For example, if they always play scissors, the winning strategy is clearly not completely random.

  69. 11 wins, 4 ties, 5 losses by Ruliz+Galaxor · · Score: 1

    11 wins, 4 ties, 5 losses. Actually, winning on veteran mode is not that difficult. The computer only knows what all other people did and it responds to your actions by using the actions of all other users. So in fact the computer is limited by the actions of all other people; it predicts that you are the same as one of those other people. If you can predict what most users would do, than you know what the response of the computer will do and so you pick a different option. So in fact you only have to beat the average guy.

  70. And thus... by Syberz · · Score: 1

    And thus, Skynet was born.

    Sure, you might be able to beat it now, but when it decides to change the rules to Rock, Paper, Scissors, Nukes... we are f*cked.

    --
    ~Syberz
    1. Re:And thus... by Anonymous Coward · · Score: 0

      The only winning move is not to play.

  71. Re:This game is random , you can't outsmart someon by nicholasjay · · Score: 1

    I used the random number generator from truerandom.org to make all of my choices for a quick game. 20-5-14, I won. I figured that if the computer was trying to analyze my previous moves to predict future performance, I'd give it something to chew on. I think the statistical analysis that the computer does assumes some sort of rational play by the human.

    Even if it could detect the 'random play', the human could try to fool the computer by using RNG for a while, and then switch to his own choice, and back (randomly, of course).

  72. at 5-5-5 vs veteran by Rooked_One · · Score: 1

    I feel that no matter how well the prediction based on previous algorithms, if chosen randomly with no thought to what you will be picking, this should be the outcome every time. It assumes you will pick something based upon your previous choice. Obviously, this is an easy system to beat once you figured it out, but I was just clicking randomly. Against random, you'll see nice, even numbers. Or odds, depending on when you want to show your score.

    1. Re:at 5-5-5 vs veteran by TrekkieGod · · Score: 1

      I feel that no matter how well the prediction based on previous algorithms, if chosen randomly with no thought to what you will be picking, this should be the outcome every time. It assumes you will pick something based upon your previous choice. Obviously, this is an easy system to beat once you figured it out, but I was just clicking randomly. Against random, you'll see nice, even numbers. Or odds, depending on when you want to show your score.

      Randomless allows you to tie it over the long run, because it won't be able to find a pattern in what you do. However, the "veteran" mode is highly predictable, at least in the beginning. The first attempt will be random. If you manage to win that one, it will assume you will try the same option next turn. Then you can beat it again. Now it will assume you will try to beat it using the same strategy. You can beat it again. Pretty much every time I play the thing, I'm guaranteed to start off with a score of at least 4 wins over the first five. I've gotten to 10-2-2, and the pattern it's using then becomes a bit harder to discern. But either way, if you have a winning strategy for the beginning of the game, you can then switch to randomness later, and you'll remain ahead, statistically speaking.

      --

      Warning: Opinions known to be heavily biased.

  73. Spent too much time on it... by Stenchwarrior · · Score: 1

    ...but I figured out that if I just randomly pick moves while talking to someone or thinking about another task I was much more successful. If, however, I thought hard about my choice and tried to use strategy then I lost big time.

    --
    Loading...
  74. Veteran is easier, I think by Reilaos · · Score: 1

    If you think about it, Veteran mode is easier; all you have to do is try to think counter to what a 'normal person' would do.

    13-7-6 on Veteran

    8-9-9 on Novice

    Hardly scientific, but yeah.

    1. Re:Veteran is easier, I think by ynp7 · · Score: 1

      I found that as well. Using the basic strategy I would against a human opponent I came up with a near-perfect split of 33-35-31 on Novice but a pretty decisive victory on Veteran at 42-34-23.

      Of course, I tend to be pretty decent at this game vs. humans so it's probably doing a pretty good job of learning how to play from people. It's just too bad that it's learning to play from run-of-the-mill RPS clowns instead of pros.

  75. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    maybe YOU can't make random choices... please stfu about the rest of us

  76. Re:This game is random , you can't outsmart someon by petermgreen · · Score: 1

    Randomness won't lose but it won't win either. Overall it will draw against any non-cheating* strategy. Therefore it would be the best strategy under the following conditions

    1: everyone had a true rng or a a csprng in their head.
    2: noone was cheating* and/or the player had the ability to throw consistenly in a way that defeated cheats
    3: everyone was rational
    4: everyone assumed everyone else was rational.

    However people are neither rational or good at coming up with random numbers....

    *A "cheating" strategy would be one where you try and determine what your opponent is in the process of throwing before you make you mind up on what you will throw...

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  77. Ha! by kurt555gs · · Score: 1

    Rock, Paper, Taser! I win!

    --
    * Carthago Delenda Est *
  78. Re:This game is random , you can't outsmart someon by coinreturn · · Score: 1

    When I want to be 'random' I map successive digits of pi to whatever problem I am considering. (In this case, 1-3: rock, 4-6: paper, 7-9: scissors.)

    Hold on while I write an algorithm to match RPS choices to strings of pi digits and I'll have you beaten.

  79. wtf - by Anonymous Coward · · Score: 0

    this is a load of utter crap -i can't see anything on my ipad...

  80. 7 for 0. by Anonymous Coward · · Score: 0

    I've got 7 wins and 2 ties so far. I don't want to play any further.

    I've been going against the veteran computer, and knowing what I do about the psychology of rock paper scissors, and assuming the demographic it has the most experience against is young men, I've decided that I will design my strategy to counter the counter to a young man's moves.

    Start with scissors. Always.

    From there, shit gets real.

  81. Re:This game is random , you can't outsmart someon by CrimsonAvenger · · Score: 1

    I do it quite easily. I pick up a standard D6, roll it, and pick rock on 1-2, paper on 3-4, scissors on 5-6.

    --

    "I do not agree with what you say, but I will defend to the death your right to say it"
  82. Re:This game is random , you can't outsmart someon by krnpimpsta · · Score: 1

    Yeah, if you guess purely random, you will probably win only 50% of the time. The real trick is to outguess the computer by figuring out what it thinks that you think.

    In reality, I beat the first 7 rounds, then lost 10 in a row. Then later lost about 12-15 rounds in a row and ragequit immediately.

    GET OUT OF MY HEAD!!!

    --

    New webcomic updated on Sundays: HERE

  83. Re:This game is random , you can't outsmart someon by GIL_Dude · · Score: 1

    The one I pick isn't random, but it is more than 2 digits. 80085.

  84. What? by mangusman · · Score: 1

    What the hell is rock-paper-scissors? Seriously. Enlighten me.

    1. Re:What? by georgesdev · · Score: 1

      Here you are: http://lmgtfy.com/?q=rock-paper-scissors Seriously, the answer is in wikipedia, but you may like the lmgtfy thing. No offense!

  85. I beat the Artificial Intelligence! by Anonymous Coward · · Score: 0

    ...by being stupid.

  86. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    not if you only play once.

  87. winna by Anonymous Coward · · Score: 0

    Maybe a human cannot beat it, but random.org can: 7-10-3 vs Veteran.

  88. Re:This game is random , you can't outsmart someon by Viol8 · · Score: 0

    Aww bless, look , a little troll has come out to play! But isn't it past your bedtime? Won't mummy troll be worried about you?

  89. Next step: Keynesian beauty contest? by bourdux · · Score: 1

    By clicking on the "See what the computer is thinking" button I think that the AI works with a simple history based algorithm. Assuming that a human player will only remember the immediate previous throws, it takes the last 4 throw pairs and will search what was the subsequent throw among all the human players who played the same sequence. Then it will just pick the move that defeats the human most likely next throw. My explanations might be a bit clumsy, sorry English is not my mother tongue, but click the button and you will understand.

    A possible strategy to defeat the AI would then to search for these patterns yourself and pick the throw that would defeat the throw that the AI thinks would defeat the human's. The problem is that if most players start acting like that, the history will change and the AI wil outsmart the human player again. As some commenters noticed before, there is no dominant strategy in RPS and playing at random seems to be the best.

    It reminds me of the Keynesian beauty contest where players have to pick not the prettiest contestants but the contestants that most people thought were pretty. I think think the next step for this algorithm would be to not only rely on the total history but also to make a model of the human player and compute how many moves he/she can read ahead of the CPU. For example, a "naive" player will always play according to the history (e.g. human scissors, CPU rock). A human player reading 1 throw ahead would play in order to defeat the CPU, based on the history (e.g. human paper). A human player seeing this strategy defeat could decide to play 2 moves ahead (e.g. human scissors). Since reading 3 moves ahead is equivalent to the naive one, the CPU would only have to make 3 categories of players.

    I am not an expert in game theory but I think it could work...

  90. Re:This game is random , you can't outsmart someon by kj_in_ottawa · · Score: 1

    According to the Jargon file 37 is the most random number.

    http://www.catb.org/jargon/html/R/random-numbers.html

    Kenny

  91. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    Exactly. They aren't random at all. Laugh if you want but there is actually a RPS strategy guide...

    ... published in Maxim.

  92. Personal experience by shadow+counselor · · Score: 1

    I actually played many games of RPS throughout my life. I even did a RPS science fair project my senior year where I went to the state level. I played my judges and ended up determining what their first two moves were as my opener for my presentation. I've easily played hundreds of thousands of games in my lifetime. In fact, I just played the AI for 1,000 matches and had the following results: I won: 373 ties: 331 Computer won: 296 I started off behind actually, but soon caught on and experienced a geometric increase of wins versus losses over time. Note how you can observe "what the computer is thinking". It's actually quite simple logic. Given the data set against 200,000 games it chooses what is most probable to win. I won't go in to the details as to what the algorithm was, you can understand it when you see it. But it makes sense. Because it had to follow that data set I found a few times where it seemed forced into certain patterns. I noticed many "paper, paper, rock sequences". I got a lot of wins out of it through that pattern. It seems that it can't adapt to you personally in real time but rather it is forced to reference its data set. Because of this, it can be defeated by humans still. It's just a matter of being proactive and noticing the patterns instead of being reactive and falling into the standard human pattern yourself. I know the standard human pattern exists from my own experiences. 90% of males start out with "scissors, paper" (at least in the Ohio area) and that was exactly how I beat all of my male judges. On a personal level, I love RPS. When two really good players are playing it as if they are staring into the depths of each other's souls and psyches. In the end, we all have a pattern. The winner is determined by how deep their pattern analysis and memory are.

  93. No news by pmontra · · Score: 1

    I programmed my 16 kB Sinclair ZX81 to play that game back in the '80s. It learned my game pattern quite well and I think to remember that it was winning about 60% of the games. The algorithm was quite simple: it recorded the frequencies of my chain of choices (depth 3 or 4?). Too bad I didn't knew about /. to come bragging on myself here :-)

  94. Old news. Real old. by david_thornley · · Score: 1

    Back in the late 1970s, there was a magazine called "Creative Computing", and the people involved put out books called "Basic Computer Games" and "More Basic Computer Games". I don't remember exactly where it was, but there was a penny-matching game that kept track of what I entered, and played accordingly. I never did manage to beat it consistently, and this was with access to the source code.

    --
    "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  95. How it works by Anonymous Coward · · Score: 0

    If you're interested in how this works, here are two blog posts about Bayesian inference and decision theory in similar games:
    my-ai-can-read-your-mind
    my-ai-can-read-your-mind (part 2)

  96. Unplug it. by __aavqan3009 · · Score: 1

    I win.

  97. But cna it play Fingerball? by clickety6 · · Score: 1

    http://boardgamegeek.com/boardgame/28522/finger-ball Nice rock-paper-scissors variant for American football fans...

    --
    ----------------------------------- My Other Sig Is Hilarious -----------------------------------
  98. Beating AI with math? by deadcellplus · · Score: 1

    So, this kinda makes me think about a related question.
    "Is it possible to construct an AI which is able to guess the k+1 digit of a transcendental mod n number if given k correct values"
    esp from how this AI works, I think it might win against it; although my math might be wrong I'm not sure if numbers like pi or e have no repeating sequences in modulo.

    1. Re:Beating AI with math? by Anonymous Coward · · Score: 0

      http://www.wolframalpha.com/input/?i=pi+base+3
      the sample size is a little small, but it seems to win for pi, e, pi^e, but not by much and e^pi tied but its not like i play many games

  99. Randomness wins by Anonymous Coward · · Score: 0

    Random.org rolling dice 1-Rock 2-Paper 3-Scissors 4-Rock 5-Paper 6-Scissors

    Randomness rules!

  100. Random choice wins by tpotus · · Score: 0

    So I gave it a random choice ffor 52 rounds and I'm leading by 25 to 18. Having a hard time predicting randomness, are we?

  101. How it works by pulver_muller · · Score: 1

    If you're interested in how this works, here are two blog posts about Bayesian inference and decision theory in similar games:
    my-ai-can-read-your-mind
    my-ai-can-read-your-mind (part 2)

  102. That's backwards by Anonymous Coward · · Score: 0

    "Republics decline into democracies, and democracies degenerate into despotisms" - Aristotle

  103. Aspie computer by Anonymous Coward · · Score: 0

    http://img508.imageshack.us/img508/9280/scr4496486.jpg

    Beat logic with logic

  104. Re:This game is random , you can't outsmart someon by blueg3 · · Score: 1

    My choices are purely random. I get my random numbers from a nonhuman source.

  105. Stupid is as stupid learns by Malenx · · Score: 1

    Given that it learns, it also picks up stupid information from the masses that taught it.

    I just played twenty rounds against this software on advanced and beat it with 8 me, 8 ties, 4 it.

    I think it might slowly learn based on a huge amount of rounds, but being a human I got pretty bored with this computer very quickly.

  106. Re:This game is random , you can't outsmart someon by IICV · · Score: 1

    That's okay though, I have access to a device that can generate sufficiently uniform random numbers between 0 and 2.

  107. Cheating by kryptKnight · · Score: 1

    I starting do much better when I stated using Wolfram-Alpha to come up with random sequences for me.

    --
    Facts do not cease to exist because they are ignored. -Aldous Huxley
  108. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    I did the same thing. BASIC on the C64, it just pattern-matched to the player's choice history. After playing for a while, it would converge to winning about 60% of the time.

    It's a good exercise for someone to write when they're just learning programming... and it helps them learn something about psychology at the same time.

  109. python strategy by boojum.cat · · Score: 1

    I used this strategy
        >>> import random
        >>> random.choice(["rock", "paper", "scissors"])
        >>> etc.
    and it still beat me 20-10. I didn't have the patience for a statistically significant number of tries, though.

    --
    Lost: one sig, witty, 120 chars, sentimental value. Reward offered.
  110. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    The standard D6 does it quite easily. I pick up a standard D6, roll it, and pick rock on 1-2, paper on 3-4, scissors on 5-6.

    Fixed it for you

  111. Patterns beat pattern-matching? by Namlak · · Score: 1

    I got 20-15-7. Interestingly, I used a pattern to see how the patten-learning machine would respond. I would throw the choice that would be vulnerable to what the computer just played. If the computer played Rock, I'd play Scissors on the next round. If the computer played Paper, I'd play Rock on the next round.

    I think that the failure of a pattern-matching algorithm is that most people will play a simple strategy so the machine will learn to expect that. If you try to anticipate, you gain an advantage because fewer people will put in the effort and the machine is less likely to learn those tactics. I'd think that if you played to the third level (anticipating that the machine is anticipating), you may gain an additional advantage.

    I think a competition of algorithms would be very cool. Start 'em up and let them play 100 million games and see who wins :)

  112. Re:This game is random , you can't outsmart someon by Quirkz · · Score: 1

    This is not the human brain making those choices, though. It's a die making the choices.

  113. A pseudo-random generator as opponent test by Anonymous Coward · · Score: 0

    Using rand() from php against the AI the results after 200 rounds:

    Wins(PHP) / Ties / Losses(AI)

    74 / 70 / 56

    Confirming, it can't handle pseudo-randomness.

  114. Versus a Pseudo Random Number Generator... by Anonymous Coward · · Score: 0

    A quick 100 round test versus Excel's Rand function produced a 33-32-35 record. So while technically the program "won" it was certainly not a statistically significant win. Knowing how predictable the rand function can be, I fully expected the program to run away, but I think the greatest margin between either side at any point was 5.

    Long story short....I am disappoint.

  115. doesn't seem that good to me by ynp7 · · Score: 1

    After 100 rounds on "Novice" I was 33-35-31. That doesn't seem like a very amazing record for a program that alleges to be able to predict what you're going to throw and beat you. I'm not exactly sure how to calculate the random odds for rock-paper-scissors, but I can't imagine that an even split like that is too far off what one would expect. So then I did 100 rounds on "Veteran" to see how it fared there, since they seem to be claiming that this will be even better at predicting what you are going to throw. I went 42-34-23. Maybe I'm just a super champ at this game, but either way I'm not impressed.

  116. RoShamBo programming contest by ubergeek65536 · · Score: 1

    This is old but these types of programs have been out for a long time. I took part in a rock paper scissors AI contest ten years ago.

    http://webdocs.cs.ualberta.ca/~darse/rsbpc.html

  117. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    I choose to select random outcomes with a dice and won 15-1-4.

  118. Well... by Anonymous Coward · · Score: 0

    I might not be able to beat the computer at rock-paper-scissors, but i clearly dominate in kickboxing.

  119. Re:This game is random , you can't outsmart someon by pclminion · · Score: 1

    This is true. However, real people aren't as random as they think they are. Years ago I heard of a competition between rock-paper-scissors computer programs and I wondered what the point was, as there's really no skill involved in this game. But that isn't really true. The skill comes in when you start trying to predict what the opponent will do.

    A random opponent can't be predicted, but if the opponent is not random and your program fails to take advantage of that fact, then your algorithm isn't the best it could be. If I always play scissors, the computer could beat me 100% of the time by always playing rock. A computer that plays randomly would win only 33% of the time. A random player would also win 33% of the time against another random player. So the program does no better on a completely predictable opponent than on a completely random one -- it's a poor algorithm.

  120. 300 games by Anonymous Coward · · Score: 0

    I beat it. I don't think I play RPS with the standard strategies. I'm rather consistent, but unable to place my strategy.

    My decisions must be seemingly random however. I played until 100 wins, it was 100 wins, 94 ties, 95 loses. There was a certain consistency between the number of wins, ties, and losses. I was generally winning by 5 though, although sometimes it went up to a tie again, but then I'd pull ahead. I believe at 50, it was 50-50-50.

    So yea... that's ~300 RPS games of my life that I will never get back...

  121. Better then Paper Rock Scissors by irrational_design · · Score: 1

    I prefer Cat Microwave Tin-Foil (use the scissors gesture for the cat, the rock gesture for the microwave, and the paper gesture for the tin foil - microwave kills cat, tin-foil kills microwave, cat cuts up tin-foil).

  122. The Doctor already did this ... by pauljlucas · · Score: 1
    --
    If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
  123. Not very new ... by rpresser · · Score: 1

    Isn't this just a variant on Claude Shannon's outguessing machine, which I think was developed in 1953?

  124. Picking randomly by QBobWatson · · Score: 1

    I tied the computer on Veteran by choosing as randomly as I could each time. Here's a way to actually choose a more or less random number between 0 and 2 in a RoShamBo setting. Say three numbers between 0 and 9 in your head. Now take each number mod 3 and add those up. You get something between 0 and 6; take that mod 3 again and that's your number. The two-step process is a somewhat chaotic system, in that it's hard to predict the outcome while you're making up the original numbers, and you're just as likely to get 0, 1, or 2. And it's easy to do mod-3 arithmetic in your head, so with a little practice you can actually apply it while playing against real people.

    That's my foolproof system for at least breaking even no matter what your opponent's strategy is.

  125. I played something like this a long time ago... by Tetsujin · · Score: 1

    On the Commodore 64, I had a program that had you input a series of values ("heads or tails", I think, as if you were calling a coin flip... I think it was from Compute's Gazette.) and tried to follow patterns in your input to guess what you'd input next. It was actually pretty good at it.

    I expect it worked by building a table of recent history (say, the last 4 moves, so a table size of 16) and then counting how many times, at the end of that sequence, you picked one value or the other...

    --
    Bow-ties are cool.
    1. Re:I played something like this a long time ago... by rpresser · · Score: 1

      This was Claude Shannon's "outguessing machine" ported to BASIC; I remember seeing it in Creative Computing. It built a Markov matrix from your entries (yes, this is the "table" you're thinking of) but it's much quicker to follow the Markov machine than to search a table.

    2. Re:I played something like this a long time ago... by Tetsujin · · Score: 1

      This was Claude Shannon's "outguessing machine" ported to BASIC; I remember seeing it in Creative Computing. It built a Markov matrix from your entries (yes, this is the "table" you're thinking of) but it's much quicker to follow the Markov machine than to search a table.

      Well, you wouldn't have to "search" a table of 16 entries... Just plug in an array index generated by shifting left the previous index and possibly adding one... What I described (if I understand Markov matrices correctly) is a fourth-order Markov matrix...

      --
      Bow-ties are cool.
  126. This really just compares you to the average joe by Anonymous Coward · · Score: 0

    The code (at least what they publish that it is) is fairly simple in that it just checks your last four throws and its last four throws versus its throw-database. So it is definitely not throwing on a random basis. Instead of testing to see if you can beat the 'computer' what means to me is that you're really comparing your thought processes to those of the general public that has tried the program. The database is made up of throws from a self selected sample group but I'd guess that since it was on the NYT it probably has a more diverse user base than if it had been posted on /.

    So if you win at a statistically significant level then maybe it proves that you think differently than the average joe...?

  127. So what happens when you pit it against itself by Anonymous Coward · · Score: 0

    I think it might Rock Rock
    Rock Rock
    Paper Paper
    Rock Rock
    Paper Paper
    Rock Rock
    Paper Paper
    Rock Rock

  128. Known far and wide... by fahrbot-bot · · Score: 1

    ...Rock-Paper-Scissors which is pretty much known by everyone on the planet by now.

    And the Uncharted Territories. From The Farscape Encyclopedia Project:

    John Crichton tried to teach Ka D'Argo the game, but D'Argo had problems because he felt that rock should tear through the paper. He finished by telling Crichton that "coma was more entertaining." ("Mind the Baby")

    They actually used RPS a lot to settle things...

    --
    It must have been something you assimilated. . . .
  129. The perfect strategy by laddiebuck · · Score: 1

    Just throw a dice for your next move. 1-2 for rock, 3-4 for paper, 5-6 for scissors. You can't be second-guessed.

  130. Not AI, just statistics by Anonymous Coward · · Score: 0

    A good AI would be able to recognize patterns in an individual's play, rather than merely guess the best strategy based on a stored corpus of 200k other games (I don't know anything about AI, but I suspect that's a very challenging problem, even when there are only 3 possibilities). For example, I just won by repeating the pattern "rock-scissors-paper-paper" over 60 rounds and it doesn't appear to have any facility to recognize that.

  131. Re:This game is random , you can't outsmart someon by chis101 · · Score: 1

    If you click "What is the computer thinking" it will tell you: It looks at the last few moves you made. It looks at the last few moves it made. It then scans its database of previous games and says "The last time a human made the moves you made, and the last time I made the moves that I made, what was the NEXT thing the human picked"

  132. How to make a robot cry by ZipK · · Score: 1

    In 50 matches, my pseudo random number generator went 19-13 with 19 ties. I could swear I heard sobbing.

  133. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    Not only argued... Documented!

    How to Win at Rock, Paper, Scissors

  134. Missing something.... by ddusza · · Score: 0

    Where's the bazooka?

    --
    Don't fear the penguins
  135. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    I always make my choices based on the role of a d6!

  136. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    Maybe it's situational

    I have seen a lot of people driving who were very random!

  137. Re: Standard D6 by nowen2dot · · Score: 1

    I'm with CrimsonAvenger. The D6 isn't going to roll itself!

    --
    I've had a perfectly wonderful evening. But this wasn't it. -- Groucho Marx
  138. Re:This game is random , you can't outsmart someon by Anonymous Coward · · Score: 0

    its true, matlab's rand function as gotten me to: 23 wins, 23 ties and 23 losses

  139. My scores by GeorgeMonroy · · Score: 0

    15 wins 15 ties and 15 losses I decided to stop at those nice figures.

    --
    You got the touch!
  140. it needs your habits to beat you; try 50+ rounds by Khopesh · · Score: 1

    I suspect most people who are good at anticipating responses will start off ahead. The veteran doesn't really catch on to your habits until round 40 or so. I found it is best to rotate strategies and always heavily err on the side of a tie. Not sure why everybody has arbitrary numbers of rounds on their posts, but I got 43-35-21 in one hundred games against veteran.

    I'm sure for real statistical relevance, well over a hundred trials are needed. I'll see how far I can get while I eat my lunch and watch my code compile.

    --
    Use my userscript to add story images to Slashdot. There's no going back.
  141. Risky Strategy by EuclideanSilence · · Score: 1

    The strategy with the highest expectation of winning is to pick 1 of 3 completely at random, unrelated to previous behavior. Then if humans have any strategy or pattern at all other than this, the computer has a winning expectation.

    It's a somewhat paradoxical approach to the game: they assume that humans all have non-random patterns, which gives the random strategy an advantage, but then choose a predictive strategy which possibly gives the computer a losing expectation.

    So to be proper, they are not trying to win since a known winning strategy already exists for any nonrandomizing human. They are trying to increase the chance of a win at the risk incorrectly predicting the pattern of some humans and losing in their cases.

  142. Re:This game is random , you can't outsmart someon by Nyder · · Score: 1

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

    That's okay bro, computers can't spit out true random numbers either.

    --
    Be seeing you...
  143. Winning Strategy by RThaiRThai · · Score: 1

    I got to 8 wins without losses. I got to 12 wins with 2 losses. My final score was 14 wins with 5 losses. I accidentally deviated from my strategy for 2 moves. Maybe the computer learned something. If you see what the computer thinks, you can read about it's exact algorithm and in theory beat it every time until its database of statistics updates.

    The idea is that, you either pick the opponent's last move, what beat's the opponent's last move, or what the opponent's last move beats, and assumes that the computer assumes you are using one of those 3 strategies. If you win a game, keep going. If you lose a game, assume the computer knows your strategy and switch to a new one which will beat the computer. If you tie, assume the computer guessed the strategy you are using incorrectly, and switch to a new one which will beat the computer.

    Step 1:
            Choose the first 4 moves randomly using a pseudo random number generator.
            i.e. paper, rock, scissors, scissors

    Step 2:
            Choose the opponent's last move until you don't win.
            If you lose, goto step 3.
            If you tie, goto step 4.

    Step 3:
            Choose what the opponent's last move beats until you don't win.
            If you lose, goto step 4.
            If you tie, goto step 2.

    Step 4:
            Choose what beats the opponent's last move until you don't win.
            If you lose, goto step 2.
            If you tie, goto step 3.

    Step 5:
            ???

    Step 5:
            Profit!!!

  144. I'm a computer! by Anonymous Coward · · Score: 0

    Score:
    Me: 6
    Ties: 12
    Computer: 6

    1. Re:I'm a computer! by Anonymous Coward · · Score: 0

      Score:
      Me: 6
      Ties: 12
      Computer: 6

      Addendum: My strategy (sort of). Select the option that would lose to what the computer selected this round.

  145. Re:it needs your habits to beat you; try 50+ round by terrisus · · Score: 1

    On Veteran, started off at 9-1-1.
    Kept going, after 100 rounds was at 38-35-27.

    So, winning more than a third of the time, and losing less than a third of the time through 100 rounds.

  146. Not so bad by Anonymous Coward · · Score: 0

    I don't know, I came from 1-5 down, then 2-8 to 13 all now. Seems like I'm the one learning what the computer thinks.

    But I don't have its patience, so I'm gonna do something else now.

  147. Veteran... by mauhiz · · Score: 0

    It is actually easier in Veteran mode, where it feels like playing against another human (probably because of the input of other users)
    The Novice mode is too unpredictable!

  148. Hmmm by Schmyz · · Score: 1

    Im not sure I can beat my 10 y/o at RPS...lol

  149. I held it off! by Gaian-Orlanthii · · Score: 1

    Has anyone beaten this program? I tried it and managed to reach an uncomfortable draw of: 6 Wins, 7 Draws, 6 Losses.
    I haven't played it since and wonder if my chances against the Skynet armies are better than most of ye.

  150. Someone call Watson, this guy sucks by BadPirate · · Score: 1

    Computer only uses the past 4 outcomes to determine how it will progress :) Too easy to game Start with Rock, and restart until you have a victory (We're going for undefeated right?) then: S,S,P,P,S,R,P,P,S - Repeat (P,S,R,R,P,P,S)

    --
    - Holy crap, I've got MOD points! Who thought that was a good idea.
  151. Not a learning computer by BadPirate · · Score: 1

    Also, Arnold could beat this guy... I'm at 100+ victories using the same pattern of victory... Seems that the 200,000 entries that it started with are all she wrote.

    --
    - Holy crap, I've got MOD points! Who thought that was a good idea.
  152. Doctor Who's Already Been There. by mwilliams666 · · Score: 1

    I'm not going to trawl through 291 comments to check, but... Ahem.. Destiny of The Daleks.