cfshrpsd

Authorcfsh
Submission date2017-09-09 11:20:34.874270
Rating3142
Matches played203
Win rate33.5

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

Source code:

import random

if not input:
 output = random.choice("RPS")
 i = 0
 a = {'R':0,'P':1,'S':2}
 d = [0,0,0]
else:
 i += 1
 d[a[input]] += 1
 if i % 30 < 15:
  output = random.choice("RPS")
 else:
  if d[0] > d[1] and d[0] > d[2]:
   output = 'P'
  elif d[1] > d[2]:
   output = 'S'
  else:
   output = 'R'