leah blogs

January 2005

23jan2005 · Rock, Scissors, Paper

There is a brilliant quiz taking place on ruby-talk: You are supposed to write an bot to play Rock, Scissors, Paper.

I had sent in these players (Arranged in strength, in local tests most winning first):

  • CNBiasInverter: Choose so that your bias will be the inverted opponent’s bias.

  • CNIrrflug: Pick a random choice. If you win, use it again; else, use a random choice.

  • CNStepAhead: Try to think a step ahead. If you win, use the choice where you’d have lost. If you lose, you the choice where you’d have won. Use the same on draw.

  • CNBiasFlipper: Always use the choice that hits what the opponent said most or second-to-most often (if the most often choice is not absolutely prefered).

  • CNBiasBreaker: Always use the choice that hits what the opponent said most often.

  • CNMeanPlayer: Pick a random choice. If you win, use it again; else, use the opponent’s choice.

It was a great fun, and the contest is still running for this week. Sit down and code!

NP: Dan Bern—Crossroads

Copyright © 2004–2022