beat-most-frequent

Authorblue-tomato
Submission date2015-06-17 21:07:58.210036
Rating3460
Matches played482
Win rate36.1

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

Source code:

import random
if input=='':
    numR = 0
    numP = 0
    numS = 0
elif input=='R':
    numR+=1
elif input=='P':
    numP+=1
else:
    numS+=1

if numR > numP and numR > numS:
    output = 'P'
elif numP > numR and numP > numS:
    output = 'S'
elif numS > numR and numS > numP:
    output = 'R'
elif numR == numP and numP == numS:
    output = random.choice(['R','P','S'])
elif numR == numP:
    output = random.choice(['P','S'])
elif numR == numS:
    output = random.choice(['P','R'])
else:
    output = random.choice(['S','R'])