drum v2

Authortomtom
Submission date2017-01-14 00:49:29.200857
Rating5317
Matches played390
Win rate53.33

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

Source code:

# drum v2

import random

if input == '':
    history = ["R", "P", "S"]
else:
    history.append(input)

what_beats = {"R": "P", "P": "S", "S": "R"}

x = random.choice(history[-30:])
output = what_beats[x]