Henny

AuthorkAworu
Submission date2019-05-14 12:31:30.334522
Rating6161
Matches played253
Win rate59.68

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

Source code:

#!/usr/bin/env python

import random

# keep track of the opponent choice history, pick one of them at random and
# beat it.
if input == "":
    history = []
    output = random.choice("RPS")
else:
    history.append(input)
    output = {"S": "R", "R": "P", "P": "S"}[random.choice(history)]