RPS-007-06

Author007
Submission date2013-10-01 21:19:05.664970
Rating5237
Matches played631
Win rate54.52

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

Source code:

import random
m = {'R': 'P', 'P': 'S', 'S': 'R'}
if input != '':
     if random.uniform(0, 1) > .5:
          output = m[input]
     else:
          del m[input]
          output = random.choice(m.values())
else:
     output = 'R'