Test_00002

AuthorJacob
Submission date2020-01-31 19:57:36.003380
Rating2985
Matches played204
Win rate29.41

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

Source code:

import random

if input == "":
    output = lastChoice = random.choice(["R", "P", "S"])
elif input == lastChoice:
    output = random.choice(["R", "P", "S"])
elif input == "R":
    if lastChoice == "S": # I lost
        output = random.choice(["R", "P"])
    else:
        output = random.choice(["R", "S"])
elif input == "P":
    if lastChoice == "R": # I lost
        output = random.choice(["P", "S"])
    else:
        output = random.choice(["R", "P"])
else: # input == "S"
    if lastChoice == "P": # I lost
        output = random.choice(["R", "S"])
    else:
        output = random.choice(["P", "S"])