duhderp(-2.0a)

Authorslowderp
Submission date2011-06-12 09:58:29.882572
Rating6278
Matches played4968
Win rate59.1

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

Source code:

from random import randint

beat = {'R':'P', 'P':'S', 'S':'R'}
if input in beat.keys():
    opmoves.append(input)
    mymoves.append(beat[opmoves[randint(0, len(opmoves)-1)]] if randint(0, 6) else beat[beat[mymoves[randint(0, len(mymoves)-1)]]])
else:
    opmoves = []
    mymoves = [beat.keys()[randint(0, 2)]]

output = mymoves[-1]