stupid1

AuthorRemz1337
Submission date2018-04-05 00:50:29.029470
Rating2865
Matches played319
Win rate25.08

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

Source code:

#Simple test of the interface
#jumping between P,R and S every SWITCH_DELAY

#CONSTANTS
SWITCH_DELAY=4

class History(object):
	def __init__(self):
		self.history=[]
		
	def AppendMove(self, move):
		self.history.append(move)
		
	def GetLength(self):
		return len(self.history)


def Predict(generation):
	rem=generation%(SWITCH_DELAY*3)
	if(rem<SWITCH_DELAY):
		pred='R'
	elif(rem<(SWITCH_DELAY*2)):
		pred='P'
	else:
		pred='S'
		
	return pred
		
if input:
	history.AppendMove(input)
else:
	#init history
	history=History()
	
output=Predict(history.GetLength())