ET Test 1

AuthorE.T.
Submission date2014-10-13 16:12:16.728386
Rating4555
Matches played532
Win rate46.8

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

Source code:

import collections

counts = collections.defaultdict(int)

def common():
  ret = ""
  c = 0
  for key, count in counts.iteritems():
    if count > c:
      ret = key
      c = count
  return ret

if input == "":
  output = "S"
else:
  counts[input] += 1
  most_common = common()
  if most_common == "R":
    output = "P"
  if most_common == "P":
    output = "S"
  if most_common == "S":
    output = "R"