blerg

Authorbleh
Submission date2017-05-17 12:11:04.720570
Rating4073
Matches played245
Win rate39.59

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

Source code:

import random

counters = { "R" : "P", "P" : "S", "S" : "R"}

if input == "":
    movehist = []
    output = random.choice(['R','P','S'])
else:
    movehist.append(input)
    counts = { "R" : 0, "P" : 0, "S": 0 }
    for rps in movehist:
        counts[input] += 1

    maxmov = ""
    maxc = 0
    for move in counts:
        if counts[move] >= maxc:
            maxmov = move
            maxc = counts[move]

    output = counters[maxmov]