Author | Mike Bufardeci |
Submission date | 2011-07-02 07:32:28.200058 |
Rating | 4989 |
Matches played | 4727 |
Win rate | 45.89 |
Use rpsrunner.py to play unranked matches on your computer.
from random import choice as p
m={"R":"P","P":"S","S":"R"}
r,b=[],m.keys()
s=[0]*len(b)
while len(r)<101:
r+=p(b)
for c in r:
s[b.index(c)]+=1
output=m[b[s.index(max(s))]]