fish1

Authorgilfish
Submission date2019-03-14 00:16:30.717485
Rating4229
Matches played249
Win rate44.18

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

Source code:

# Forget opponent's past moves at the rate lambda.
# This anticipates a change in the opponent's strategy.
alpha = 0.7

if input == "": # initialize variables for the first round
	rockCount = paperCount = scissorsCount = 0
elif input == "R":
	rockCount += 1
elif input == "P":
	paperCount += 1
elif input == "S":
	scissorsCount += 1

rockCount *= alpha
paperCount *= alpha
scissorsCount *= alpha

if rockCount > paperCount and rockCount > scissorsCount:
	output = "P" # paper beats rock
elif paperCount > scissorsCount:
	output = "S" # scissors beats paper
else:
	output = "R" # rock beats scissors