real_window

Authorkyle morrison
Submission date2011-06-09 09:28:48.865597
Rating4435
Matches played5101
Win rate40.4

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)