rock paper scissors game

Started by
6 comments, last by bucheron 19 years, 11 months ago
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]
Advertisement
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.
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.
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.
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]
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.

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

This topic is closed to new replies.

Advertisement