sha256

AuthorRyanC
Submission date2012-10-03 22:16:29.829585
Rating3348
Matches played783
Win rate30.78

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

Source code:

from hashlib import sha256

state = ''

throws = ['R', 'P', 'S']

if input:
    state = state + input

output = throws[int(sha256(state).hexdigest(), 16) % len(throws)]