multi_algo_1

This program has been disqualified.


Authorjfp
Submission date2011-06-09 21:58:46.961198
Rating0
Matches played0
Win rate0

Source code:

import random

algo = random.choice(["a", "b", "c"])
if  algo == "a":
  # Play randomly.
  output = random.choice(["S", "R", "P"])
elif algo == "b":
  # Play the move that would have won last time.
  if input == "R":
    output = "P"
  elif input == "P":
    output = "S"
  else:
    output = "R"
elif algo == "c":
  # Play the same move again.
  if not output:
    output = "S"
  else:
    output = output