repeat_of_two

Authorcuriouscat
Submission date2012-12-21 03:37:13.740978
Rating1782
Matches played732
Win rate15.16

Use rpsrunner.py to play unranked matches on your computer.

Source code:

import random
if input == "": # initialize variables for the first round
        output = random.choice(["R","P","S"])
        last = random.choice(["R","P","S"])
elif input == "R" and last == "R":
	output = "S"
elif input == "P" and last == "P":
	output = "R"
elif input == "S" and last == "S":
	output = "P"
else:
        output = random.choice(["R","P","S"])

last=input