2_overall_pred

AuthorColin Rice
Submission date2012-11-20 22:05:00.516552
Rating4227
Matches played802
Win rate43.89

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

Source code:

import random

def next(entry):
    a = ['R', 'P', 'S']
    index = a.index(entry)
    index = index+1
    if index > 2:
        index = 0
    return a[index]

if input=="":
    output = random.choice(['R', 'P', 'S'])
    their_moves = []
else:
    their_moves.append(input)
    choice = random.choice(input)
    output = next(choice)