duxing207

Authorduxing2007
Submission date2013-10-05 03:25:58.317857
Rating3422
Matches played674
Win rate35.91

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"])
elif input == "R":
	if output == "R":
                output = random.choice(["R","P","P","P","S","S"])
        elif output == "P":
				output = random.choice(["R","R","R","P","S","S"])
        else:
				output = random.choice(["R","R","R","P","S","S"])
elif input == "P":
	if output == "R":
				output = random.choice(["R","R","R","P","S","S"])
        elif output == "P":
				output = random.choice(["R","R","R","P","S","S"])
        else:
				output = random.choice(["R","R","R","P","S","S"])
else:
	if output == "R":
                output = random.choice(["R","P","P","P","S","S"])
        elif output == "P":
				output = random.choice(["R","R","R","P","S","S"])
        else:
				output = random.choice(["R","R","R","P","S","S"])