Home » Community » Forums » Math and Physics » rock paper scissors game
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 rock paper scissors game
Post New Topic  Post Reply 
I hope this belongs to the right forum...it's about statistics and game theory.

I found a contest where you have to code a web-service (.NET) that will play the "rock paper scissors" game. The entries will fight in dual, 25 runs, the winner is obviously the one that has more points than his opponent (1 point if winning choice, 0 points if same choices for both players, if same points at the end of the 25 runs, the winner is randomly chosen). I must add that the rock, the paper and the scissors have the same "destruction weight".

The two opponents can't use "hacks" or "cheats", they must be considered as black-boxes and a player only sees the output of his opponent.

I find this contest quite meaningless because if you create a web-service that randomly choose its output, how could an opponent setup a valid strategy ? My opinion is that if you want to beat a "random" player with this game, your only chance is to output a random choice. And if you want to win the contest, you should implement the best pseudo-random generator available up to date.

Is it true ?

[edited by - bucheron on May 26, 2004 1:09:54 PM]

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

If the opponent is truely random, you could see which choice it has selected the least and choose the option that defeats that choice. Thats assuming random selection eventually selects each option about the same number of times.

 User Rating: 1015    Report this Post to a Moderator | Link

The AP above me doesn't understand randomness. The idea presented there won't work.

I once saw a web page about another rock paper scissors contest. I beleive the players played hundreds of games against each other, and to make things interesting there were some dummy players entered that intentionally used strategies that could be detected and exploited by their opponents. This encouraged players to try to implement pattern detection algorithms, and because all the players were trying to detect the patterns of their opponents and respond to them, this left them open to having their own patterns detected and exploited.

Against a random rock, paper, scissors opponent you cannot expect to win more than 50% of the time on average in the long run.

 User Rating: 1015    Report this Post to a Moderator | Link

If your opponent makes its choices based on a totally random process with equal weights then your chance of winning is a half, whatever process you use. So making a totally random generator is a safe bet. If you're opponent isn't choosing in this way however you could write code to beat it. However in doing this you open up your code to be beaten.

So this competition isn't useless, unless people do just put in random strategies. In doing this they are at a disadvantage though, because they could be kicked out by a bad entry and be unlucky, one that they could have beaten with pattern spotting.

The thing I don't get though is the low number of games. Why not 25 thousand, that removes the element of chance.

I think the statistics on this competition could be rather interesting. Will totally random entries come halfway down?


The main problem with this sort of thing could be that the hard part for a participant isn't making a winning program, but understanding why you won afterwards.


 User Rating: 1087   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Thanks for your answers. Another rule in the compo states that an entry is not allowed to return the same value for the 25 runs (which are too low, I agree on that). What about checking maybe for 10 runs if you are facing a random opponent and then adapt the strategy. What's the best way to determinate if the outputs of the other player are coming from a random generator or are following some patterns ? (sorry..I'm quite rusty with my statistics knowledges, must be autocorrelation or something..)

The compo "CodeDuel" is there (french/german) :

http://www.codezone.ch

[edited by - bucheron on May 26, 2004 4:31:16 PM]

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Google for `icga roshambo' and you will find tons of information on the issue. I only payed attention to the first tournament (about three years ago). You can find the code of some of the winners.



 User Rating: 1576   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Damn good page ! you get a virtual beer It also breaks the random strategy, exactly what I wanted to read. However, they had 1000 runs, I suppose it has a great impact on pattern prediction robustness compared to the 25 runs of the swiss contest.

[edited by - bucheron on May 26, 2004 5:24:03 PM]

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I am currently developing a Rock Paper Scissors 3D game with one of my friends, amoung others, I uses the predictors described in the book 'AI Game Programming'.

 User Rating: 1201   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: