Slashdot Mirror


Rock-Paper-Scissors

Andreas Junghanns writes: "Check out the Second International RoShamBo Programming Competition for a completely different experience! If you think you know everything about Rock-Paper-Scissors -- here is your chance to prove it against some stiff international competition. At the Web site you can find rules, sample programs and a report of the first contest, complete with results and program descriptions." This looks pretty cool, and it might make a neat first project for someone, too.

6 of 136 comments (clear)

  1. I won the last year's competition -- here's how... by egnor · · Score: 5

    My submission, Iocaine Powder, won last year's competition. Follow the link to see a complete description of how it works. The competition results from last year describe some of the other strategies that did well (and some that did not-so-well).

    This competition is more complex than it seems; not only are there deliberate "dumb robots", but many of the real entries are quite predictable. A random player wouldn't have made it close to winning, and stalemates were rare.

    What does this year hold in store? We'll just have to see!

  2. Typical of Slashdot to glorify violence by Anonymous Coward · · Score: 4

    I'm really not suprised that all you gun-toting, neo-nazi Americans would try to glorify some excessively violent childhood game like Rock Paper Scissors. Have any of you stopped to consider what these sorts of values these pasttimes instill in our children?

    I mean, let's start with the rock. And I'm not refering to that movie with Nicholas Cage & Sean Connery in it, either. Rocks == Violence! Ask any caveman! Were it not for Oog being silenced by the Lameness Filter, I assure you he would back me up on this.

    As for the scissors, well why don't you just throw children off a cliff? How many times have we been told not to run with scissors, and here /. is urging people to use them as both toys and weapons!

    And the paper... oh Lord, how irresponsible can you get? We do all we can to squash that horrible "Puff the Magic Dragon" degenerate druggy song and then you people come along and start handing out Zig Zag's to elementary school students!

    While we're at it, let's review the "premise" of this whole "game":

    • Rocks violently destroy scissors
    • Scissors violently slice apart paper
    • Paper violently smothers the helpless rock

    Are any of you thinking about the children? I seriously doubt it!

  3. Of RoShamBo and the Princess Bride by grappler · · Score: 4

    It's just like that game in the movie "Princess Bride", where a man reasons that to poison your drinking partner, you put the poison into your own glass. If he is suspicious he will switch with you when your back is turned, and will bring about his own doom. However, if he is a step cleverer than that, it becomes impossible to outsmart him - as the reverse-reverse psychologies pile up, the game boils down to random chance. Of course, the hero in the movie knew this and poisoned both glasses. After his opponent got thorougly lost in a maze of pseudo-logic, he took his poison and that was that.

    That's the kind of visual image I get of someone trying to write a program that would win this contest - the "inconceivable!" guy from princess bride.

    I wonder how a simple markov chain would do. That's where the probability of every move is based on the outcome of the previous game. For instance, "2 of the 3 times his rock beat my paper, his next move was scissors, so since his rock just beat my paper again, I'll anticipate scissors this time and go rock." I think this kind of reasoning would beat your typical human roshambo player in the long run, since a human would typically have a certain response based on what just happened.

    Obviously, it's different with a computer. The program might anticipate this kind of thing, and has no general "feeling" that would you any reason to link a round to the one that came before. The more I think about this, the more I think it's just a matter of guessing right what other people will do.

    --
    grappler

    --
    Vidi, Vici, Veni
  4. Cheater bots by Temporal · · Score: 5

    Several cheater bots were entered in the last tournament. They were disqualified, of course, but here are the funniest ones:

    • Fork Bot: Every move, this bot would fork itself into 3 processes and make a different move in each one. Any process that lost would be killed off in the next round, with the winning process continuing the tournament. Thus, you would think that it would never lose. However, when playing against the Psychic Friends Network, all three moves resulted in a loss, causing the Fork Bot to kill itself off, ending in a forfeit.
    • The Psychic Friends Network: This program won 998/1000 rounds against any opponent other than The Matrix. No one really knows how it works, being incredibly obfusicated, but it appears to mess with the stack directly, among other things.
    • The Matrix: Based on the simple premise "There is no spoon", this program won every single round of every match it was in. (Being written by the author of the tournament software, this was not very hard)

    For more info, see this page (near the bottom).

    ------

  5. Re:This Must Be More Complex Than It Sounds . . . by PurpleBob · · Score: 4

    The catch is that they put in some deliberately dumb robots, so that if you just use the optimal mixed strategy (randomness), you've got a 50% chance of beating them, but you can clobber them if you've got an actual plan.

    In their FAQ, they tell you not to submit the random strategy, because it'll be guaranteed to finish in the middle of the pack.
    --
    No more e-mail address game - see my user info. Time for revenge.

    --
    Win dain a lotica, en vai tu ri silota
  6. Random number generators by Joe+Rumsey · · Score: 4
    From the FAQ (bold is mine):

    Q: Can I produce my own random numbers, or must I use random(), and the provided flip_biased_coin() and biased_roshambo()? >/p>

    A: You may use your own random number generator, but it must use a fixed seed, so that the tournament results are reproducible, given a fixed seed to srandom(). However, there is little to be gained from using your own RNG.

    It seems to me that since they've also told you that random() is to be used, someone very clever could try to predict the opponent's choices based on sequence random() is returning. You aren't allowed to reseed it of course, but if your code is getting a certain sequence of numbers, is it possible to write code to figure out the current seed, and thus the entire sequence of numbers? Based on where your code winds up picking up the sequence, you know how many random numbers the opponent generated each round. Using that, you can possibly draw a correlation between the numbers you know he's getting and the choices he makes.

    Granted, this is a longshot, and I know I'm not that clever, but on the other hand, there are lots of random number generators out there free for the taking. I'd spend the few minutes to add one to my code just to guarantee an attack like this won't work.