random_=D3

AuthorRANDOM_=D
Submission date2011-05-21 22:43:51.565237
Rating4943
Matches played7442
Win rate48.93

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

Source code:

import math
import random

r = random.randrange(0,2)
if r==0 or r==1:
	move = random.randrange(0,3)
	if move == 1:
		output = "R"
	elif move == 2:
		output = "P"
	else:
		output = "S"
elif r==2:
	if not input:
	    	output = 'P'
	else:
	    	output = {'R':'P', 'P':'S', 'S':'R'}[input]