first attempt

Authorhawk
Submission date2011-06-09 09:08:41.121450
Rating5962
Matches played5454
Win rate57.76

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

Source code:

import random

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

tc = rc + pc + sc

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