second attempt

Authorhawk
Submission date2011-06-09 09:37:04.712750
Rating6033
Matches played5610
Win rate58.54

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

Source code:

import random

if input == "":
    rc, pc, sc = 1, 1, 1
elif input == "R":
    rc += 1
elif input == "P":
    pc += 1
elif input == "S":
    sc += 1

tc = rc + pc + sc

r = random.randint(1, tc)
if r <= rc:
    output = "P"
elif r <= rc + pc:
    output = "S"
else:
    output = "R"