SimpleHenny + Sore Winner

AuthorLinch
Submission date2020-01-02 01:28:17.754938
Rating5644
Matches played209
Win rate56.46

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

Source code:

import random
beats = {'R':'P', 'P':'S', 'S':'R'}
if not input:
  history = 'RPS'
  win_over_losses = 0
history += input
if input:
  win_over_losses += output == beats[input]
  win_over_losses -= input == beats[output]

output = beats[random.choice(history)]

# Sore winner
if win_over_losses >= 30:
  output = random.choice('RPS')