Henny

AuthorkAworu
Submission date2019-05-14 12:31:30.334522
Rating5760
Matches played200
Win rate58.0

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)]