rear_window

Authorkyle morrison
Submission date2011-06-10 05:27:02.842005
Rating5181
Matches played5413
Win rate57.05

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

Source code:

import random
moves = {'R': 'P', 'P': 'S', 'S': 'R'}
if not input:
    history = ''
history += input

if len(history) < 25:
    output = random.choice(moves.keys())
else:
    possible = [moves[i] for i in history[-25:]]
    output = random.choice(possible)