Author | SirWhyte |
Submission date | 2016-01-01 17:01:37.706837 |
Rating | 6393 |
Matches played | 445 |
Win rate | 63.82 |
Use rpsrunner.py to play unranked matches on your computer.
import random
s = 5
if input == "":
output = random.choice(["R", "P", "S"])
rps_next = {'P': 'S', 'S': 'R', 'R': 'P'}
h = ""
else:
h += input + output
output = rps_next[random.choice(h+h[-s:]+h[-2*s:]+h[-3*s:])]