This program has been disqualified.
Author | jfp |
Submission date | 2011-06-13 15:49:47.865841 |
Rating | 2039 |
Matches played | 8 |
Win rate | 25.0 |
import random
if input == "":
output = "S"
algo = random.choice(["a", "b", "c", "d"])
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.
output = output
elif algo == "d":
# Play the opponent's move.
output = input