This program has been disqualified.
Author | dllu |
Submission date | 2011-05-22 07:43:59.757230 |
Rating | 4740 |
Matches played | 173 |
Win rate | 47.4 |
import random
lastmatch=0
if not input:
urmoves=""
mymoves=""
output = random.choice(['R','P','S'])
else:
output = random.choice(['R','P','S'])
urmoves+=input
for i in range(len(urmoves)-1,20,-1):
match=0
j=1
while mymoves[i-j]==mymoves[len(urmoves)-j]:
match+=1
if match>lastmatch:
lastmatch=match
output=urmoves[i]
if match>30:
break
output = {'R':'P', 'P':'S', 'S':'R'}[output]
mymoves+=output