lister

Authorkyle morrison
Submission date2011-06-10 07:58:13.828876
Rating6027
Matches played5179
Win rate62.68

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

Source code:

import random
moves = {'R': 'P', 'P': 'S', 'S': 'R'}
if not input:
    i = 0
    history = ''
    my_moves = ''
    things = []
    output = random.choice(moves.keys())
else:
    i += 1
    history += input
    my_moves += output

    things += i*list(input)
    things += i*list(moves[output])

    their_move = random.choice(things)
    output = moves[their_move]