Beat Most Common Winning Move

AuthorAKohn
Submission date2013-10-23 18:17:00.860240
Rating4092
Matches played656
Win rate34.3

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

Source code:

if input=="":
    rWins=pWins=sWins=0
elif input=="R":
    if lastMove=="S":
        rWins+=1
elif input=="P":
    if lastMove=="R":
        pWins+=1
elif input=="S":
    if lastMove=="P":
        sWins+=1
if rWins>pWins and rWins>sWins:
    output=lastMove="P"
elif pWins>sWins:
    output=lastMove="S"
else:
    output=lastMove="R"