This program has been disqualified.
Author | TheMoooh |
Submission date | 2015-08-06 18:13:59.358757 |
Rating | 5214 |
Matches played | 232 |
Win rate | 52.16 |
#No META still win
import random
if input == "":
rps = ["R", "P", "S"]
beat2 = {'PP': 'S', 'SS': 'R', 'RR':'P', 'PS': 'S', 'PR': 'P', 'RS': 'R', 'RP': 'P', 'SP': 'S', 'SR': 'R'}
roundsPlayed = 0
OH =""
MH =""
output = random.choice(rps)
moves= [random.choice(rps),random.choice(rps),random.choice(rps)]
p = 0
else:
roundsPlayed+=1
OH += input
MH += output
frq = [0,0,0]
myfrq = [0,0,0]
for i in range(0, roundsPlayed/20):
frq[0] += (i+1)*OH.count(OH[-i:]+"R")
frq[1] += (i+1)*OH.count(OH[-i:]+"P")
frq[2] += (i+1)*OH.count(OH[-i:]+"S")
myfrq[0] += (i+1)*MH.count(MH[-i:]+"R")
myfrq[1] += (i+1)*MH.count(MH[-i:]+"P")
myfrq[2] += (i+1)*MH.count(MH[-i:]+"S")
frq = (zip(frq,rps))
frq.sort()
myfrq = (zip(myfrq,rps))
myfrq.sort()
moves = [frq[2][1],frq[1][1],frq[0][1]]
mymoves = [myfrq[2][1],myfrq[1][1],myfrq[0][1]]
output = beat2[moves[0] + mymoves[1]]