Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

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

timothy posted more than 3 years ago | from the why-do-you-feel-can-you-beat-a-computer? dept.

AI 292

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

Sorry! There are no comments related to the filter you selected.

#winning! (1, Troll)

alphatel (1450715) | more than 3 years ago | (#35428106)

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

Re:#winning! (3, Funny)

SimonTheSoundMan (1012395) | more than 3 years ago | (#35428142)

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.

I can beat the computer... (5, Funny)

bobdotorg (598873) | more than 3 years ago | (#35428108)

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

Re:I can beat the computer... (4, Funny)

Mortiss (812218) | more than 3 years ago | (#35428130)

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

Typical human behavior... Always resorting to violence.

Re:I can beat the computer... (5, Informative)

bmorency (1221186) | more than 3 years ago | (#35428172)

I prefer rock paper scissors lizard spock myself.

Re:I can beat the computer... (4, Funny)

daid303 (843777) | more than 3 years ago | (#35428360)

http://www.umop.com/rps101/rps101chart.html [umop.com]
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.

Re:I can beat the computer... (2)

somersault (912633) | more than 3 years ago | (#35428272)

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.

Re:I can beat the computer... (1)

JackOfAllGeeks (1034454) | more than 3 years ago | (#35428374)

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.

Re:I can beat the computer... (1)

mwvdlee (775178) | more than 3 years ago | (#35428432)

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.

Re:I can beat the computer... (1)

JackOfAllGeeks (1034454) | more than 3 years ago | (#35428488)

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.

Re:I can beat the computer... (1)

Enigma23 (460910) | more than 3 years ago | (#35428544)

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. :)

Rock beats paper (1)

BrunBoot13 (787805) | more than 3 years ago | (#35428112)

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/ [cslacker.com] . Also, there are strategies for winning the game consistently: http://i.imgur.com/F2r3V.jpg [imgur.com] .

Re:Rock beats paper (1)

digitig (1056110) | more than 3 years ago | (#35428526)

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

First paper, then scissors, then rock (5, Funny)

presspass (1770650) | more than 3 years ago | (#35428122)

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

--
Pass

Re:First paper, then scissors, then rock (2)

Neil Boekend (1854906) | more than 3 years ago | (#35428368)

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

Yes (3, Funny)

TimmyRt (1354547) | more than 3 years ago | (#35428124)

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

Well known (0)

Anonymous Coward | more than 3 years ago | (#35428132)

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

confused (0)

mattiyeh (1096105) | more than 3 years ago | (#35428134)

NYTimes = the new candystand?

This game is random , you can't outsmart someone (1)

Viol8 (599362) | more than 3 years ago | (#35428140)

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

Re:This game is random , you can't outsmart someon (3, Interesting)

Tukz (664339) | more than 3 years ago | (#35428156)

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

Re:This game is random , you can't outsmart someon (2)

ddxexex (1664191) | more than 3 years ago | (#35428222)

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.

The Princess Bride (1)

mangu (126918) | more than 3 years ago | (#35428440)

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.

Re:This game is random , you can't outsmart someon (1)

sourcerror (1718066) | more than 3 years ago | (#35428500)

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

Re:This game is random , you can't outsmart someon (0)

Anonymous Coward | more than 3 years ago | (#35428530)

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.

Re:This game is random , you can't outsmart someon (1)

ArAgost (853804) | more than 3 years ago | (#35428296)

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

Re:This game is random , you can't outsmart someon (1)

Tukz (664339) | more than 3 years ago | (#35428310)

Then it's not your choice.

Re:This game is random , you can't outsmart someon (0)

Anonymous Coward | more than 3 years ago | (#35428324)

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.

Re:This game is random , you can't outsmart someon (1)

JackOfAllGeeks (1034454) | more than 3 years ago | (#35428388)

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

Re:This game is random , you can't outsmart someon (1)

Olix (812847) | more than 3 years ago | (#35428508)

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!

Re:This game is random , you can't outsmart someon (1)

SoVeryTired (967875) | more than 3 years ago | (#35428188)

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.

Re:This game is random , you can't outsmart someon (0)

Anonymous Coward | more than 3 years ago | (#35428196)

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?

Re:This game is random , you can't outsmart someon (1)

somersault (912633) | more than 3 years ago | (#35428326)

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.

Re:This game is random , you can't outsmart someon (1)

91degrees (207121) | more than 3 years ago | (#35428344)

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

Re:This game is random , you can't outsmart someon (1)

Chris Mattern (191822) | more than 3 years ago | (#35428276)

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

Re:This game is random , you can't outsmart someon (1)

apharov (598871) | more than 3 years ago | (#35428278)

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.

Re:This game is random , you can't outsmart someon (1)

heikkile (111814) | more than 3 years ago | (#35428314)

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

Re:This game is random , you can't outsmart someon (1)

N1AK (864906) | more than 3 years ago | (#35428396)

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.

Re:This game is random , you can't outsmart someon (1)

bcmm (768152) | more than 3 years ago | (#35428516)

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.

Maximise your chances (1)

fatphil (181876) | more than 3 years ago | (#35428146)

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

Re:Maximise your chances (1)

dingen (958134) | more than 3 years ago | (#35428410)

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

Re:Maximise your chances (1)

dingen (958134) | more than 3 years ago | (#35428540)

Nevermind, I get it now.

more interesting version would be (0)

Anonymous Coward | more than 3 years ago | (#35428150)

rock-paper-scissors-lizard-spock!

and then we always tie at 'spock' :)

Obligatory Simpsons (1)

antifoidulus (807088) | more than 3 years ago | (#35428154)

Good ol' rock, nothing beats it.

Ob. Simpsons: (2)

david@ecsd.com (45841) | more than 3 years ago | (#35428158)

Lisa: Poor predictable Bart, always chooses rock.

Bart: Good ol' rock, nothing beats that!

green eggs n ham .. (0)

Anonymous Coward | more than 3 years ago | (#35428160)

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

This will not end well..... (1)

Dawayne409 (2008382) | more than 3 years ago | (#35428164)

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.

Basically... (1)

Mr2cents (323101) | more than 3 years ago | (#35428174)

So, it is a computer version of Derren Brown [yahoo.com] ?

Best strategy (1)

mseeger (40923) | more than 3 years ago | (#35428178)

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

Re:Best strategy (1)

SoVeryTired (967875) | more than 3 years ago | (#35428230)

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?

Re:Best strategy (1)

zero.kalvin (1231372) | more than 3 years ago | (#35428252)

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.

Re:Best strategy (1)

Eagleshadow (1979074) | more than 3 years ago | (#35428372)

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 [dropbox.com]

Re:Best strategy (1)

mwvdlee (775178) | more than 3 years ago | (#35428472)

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.

Re:Best strategy (3, Interesting)

N1AK (864906) | more than 3 years ago | (#35428442)

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.

Re:Best strategy (1)

mseeger (40923) | more than 3 years ago | (#35428328)

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

Re:Best strategy (1)

dingen (958134) | more than 3 years ago | (#35428448)

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.

Is the Terminator Far Behind (1)

thebian (1218280) | more than 3 years ago | (#35428198)

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.

Re:Is the Terminator Far Behind (1)

Neil Boekend (1854906) | more than 3 years ago | (#35428428)

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!

I spent the last few years building up... (1)

Eunuchswear (210685) | more than 3 years ago | (#35428202)

up an immunity to iocane powder.

Not very good (1)

Arancaytar (966377) | more than 3 years ago | (#35428204)

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.

Re:Not very good (1)

WinstonWolfIT (1550079) | more than 3 years ago | (#35428248)

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

computer RoShamBo competion (1)

kwikrick (755625) | more than 3 years ago | (#35428208)

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 [ualberta.ca]

Predictable (0)

Anonymous Coward | more than 3 years ago | (#35428236)

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.

Isn't this how games like Mortal Kombat work? (1)

Anonymous Coward | more than 3 years ago | (#35428240)

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.

It's already obsolete (2)

Israfels (730298) | more than 3 years ago | (#35428244)

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

Help me statistician your my only hope ... (1)

stuckinarut (891702) | more than 3 years ago | (#35428262)

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.

A little presumptuous (0)

Anonymous Coward | more than 3 years ago | (#35428264)

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

Re:A little presumptuous (1)

Errol backfiring (1280012) | more than 3 years ago | (#35428338)

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

Re:A little presumptuous (1)

dingen (958134) | more than 3 years ago | (#35428484)

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

Re:A little presumptuous (1)

grumbel (592662) | more than 3 years ago | (#35428494)

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.

Re:A little presumptuous (1)

dingen (958134) | more than 3 years ago | (#35428478)

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.

First draw might be biased? (0)

Anonymous Coward | more than 3 years ago | (#35428286)

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.

Paper Rules (2)

MathiasRav (1210872) | more than 3 years ago | (#35428300)

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.

100-106-125 on vet (1)

futureist (2012330) | more than 3 years ago | (#35428316)

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

oh yeah (0)

Anonymous Coward | more than 3 years ago | (#35428322)

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

TL:DR; No. (4, Funny)

definate (876684) | more than 3 years ago | (#35428330)

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

Re:TL:DR; No. (4, Funny)

WombatDeath (681651) | more than 3 years ago | (#35428404)

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

Re:TL:DR; No. (1)

definate (876684) | more than 3 years ago | (#35428430)

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!

worst? (0)

Anonymous Coward | more than 3 years ago | (#35428492)

What was the worst moment of your life?

Re:TL:DR; No. (1)

prionic6 (858109) | more than 3 years ago | (#35428438)

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.

Re:TL:DR; No. (1)

definate (876684) | more than 3 years ago | (#35428458)

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.

Re:TL:DR; No. (1)

Neil Boekend (1854906) | more than 3 years ago | (#35428464)

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.

Yes. (1)

Maxx169 (920414) | more than 3 years ago | (#35428336)

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

play (1)

futureist (2012330) | more than 3 years ago | (#35428350)

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.

I can say - YES (1)

devaudio (596215) | more than 3 years ago | (#35428364)

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

Sheldon (1)

yabba-dabba-do (948536) | more than 3 years ago | (#35428398)

But can it play Rock Paper Scissors Lizard Spock?

i've got old bash scripts with better odds no ai (1)

nwmann (946016) | more than 3 years ago | (#35428400)

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.

Sometime the learning is quite straightforward (2)

macs4all (973270) | more than 3 years ago | (#35428414)

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.

Reminds me of a Commodore program (1)

smchris (464899) | more than 3 years ago | (#35428418)

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.

excessive shaking, creators deny involvement (-1)

Anonymous Coward | more than 3 years ago | (#35428420)

'it's not us', they say?

MAP [slashdot.org] 2.6 2011/03/09 12:14:14 [slashdot.org] 32.618-115.757 4.6BAJA CALIFORNIA, MEXICO
MAP [slashdot.org] 4.7 2011/03/09 12:03:17 [slashdot.org] 38.343 143.105 10.4OFF THE EAST COAST OF HONSHU, JAPAN

MAP [slashdot.org] 5.1 2011/03/09 11:27:50 [slashdot.org] 38.573 143.146 12.0OFF THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 4.7 2011/03/09 10:13:37 [slashdot.org] 38.724 143.099 10.1OFF THE EAST COAST OF HONSHU, JAPAN

MAP [slashdot.org] 4.8 2011/03/09 08:55:38 [slashdot.org] 38.667 143.055 15.6OFF THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 3.3 2011/03/09 08:37:30 [slashdot.org] 18.066 -68.122 84.1MONA PASSAGE, DOMINICAN REPUBLIC

MAP [slashdot.org] 5.3 2011/03/09 08:02:36 [slashdot.org] 38.606 143.103 15.4OFF THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 5.1 2011/03/09 07:56:28 [slashdot.org] 38.849 142.929 10.7NEAR THE EAST COAST OF HONSHU, JAPAN

MAP [slashdot.org] 5.0 2011/03/09 07:13:48 [slashdot.org] 38.246 143.108 9.9OFF THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 5.1 2011/03/09 06:25:12 [slashdot.org] 38.299 143.067 10.8OFF THE EAST COAST OF HONSHU, JAPAN

MAP [slashdot.org] 4.9 2011/03/09 06:12:13 [slashdot.org] 38.681 143.022 10.0OFF THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 4.7 2011/03/09 05:27:06 [slashdot.org] 37.830 145.135 10.0OFF THE EAST COAST OF HONSHU, JAPAN

MAP [slashdot.org] 5.3 2011/03/09 04:45:54 [slashdot.org] 38.543 142.740 27.0NEAR THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 5.7 2011/03/09 04:37:04 [slashdot.org] 38.666 142.991 25.5NEAR THE EAST COAST OF HONSHU, JAPAN

MAP [slashdot.org] 5.2 2011/03/09 04:32:10 [slashdot.org] 38.727 143.001 32.1OFF THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 3.1 2011/03/09 04:17:17 [slashdot.org] 34.280-116.837 6.0SOUTHERN CALIFORNIA

MAP [slashdot.org] 4.8 2011/03/09 04:15:39 [slashdot.org] 38.857 142.658 12.6NEAR THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 5.2 2011/03/09 04:05:54 [slashdot.org] 38.870 142.420 10.9NEAR THE EAST COAST OF HONSHU, JAPAN

MAP [slashdot.org] 5.0 2011/03/09 03:19:00 [slashdot.org] 38.795 142.962 19.9NEAR THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 5.2 2011/03/09 03:08:36 [slashdot.org] 38.339 143.097 24.4OFF THE EAST COAST OF HONSHU, JAPAN

MAP [slashdot.org] 5.6 2011/03/09 02:57:17 [slashdot.org] 38.402 142.825 17.5NEAR THE EAST COAST OF HONSHU, JAPAN
MAP [slashdot.org] 7.2 2011/03/09 02:45:18 [slashdot.org] 38.510 142.792 14.1NEAR THE EAST COAST OF HONSHU, JAPAN

                     

It allowed randomness to make your choices (1)

Shivetya (243324) | more than 3 years ago | (#35428424)

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

Potentially, anyway (0)

Anonymous Coward | more than 3 years ago | (#35428462)

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.

Re:It allowed randomness to make your choices (3, Funny)

j_sp_r (656354) | more than 3 years ago | (#35428532)

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.

next up... (0)

Anonymous Coward | more than 3 years ago | (#35428436)

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

Can You Beat a Computer At Rock-Paper-Scissors? (1)

ludwigf (1208730) | more than 3 years ago | (#35428450)

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?

RPSLS (0)

Anonymous Coward | more than 3 years ago | (#35428456)

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

Rock paper scissors lizard spock? (1)

Ecuador (740021) | more than 3 years ago | (#35428460)

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

No Good (1)

The Aethereal (1160051) | more than 3 years ago | (#35428506)

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

Human has the advantage (0)

Anonymous Coward | more than 3 years ago | (#35428536)

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.

Erratia... (0)

Anonymous Coward | more than 3 years ago | (#35428546)

I won!

It lacks intuition... Avoid predictability!

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?