Simplest

AuthorDaniel
Submission date2013-10-02 17:24:18.164380
Rating1830
Matches played628
Win rate20.22

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

Source code:

input = 'S'
try:
    last
except:
    from random import choice
    output = choice(list('RPS'))
    last = ''
else:
    if last == input:
        choices = {'R':'P','P':'S','S':'R'}
        output = choices[input]
    else:
        choices = {'PR':'P','PS':'S','RS':'R'}
        key = ''.join(sorted('RPS'.replace(input,'')))
        last = input
        output = choices[key]
print output