This program has been disqualified.
Author | Toblich |
Submission date | 2016-04-05 09:06:28.780199 |
Rating | 3416 |
Matches played | 248 |
Win rate | 32.26 |
from random import choice
from bz2 import compress
if input == "":
anteriores = ""
output = choice(["R", "P", "S"])
else:
anteriores += input
r = len(compress(anteriores + "R"))
p = len(compress(anteriores + "P"))
s = len(compress(anteriores + "S"))
if r < p and r < s: # Shorter length means higher probability
output = "P" # Paper beats Rock
elif p < s:
output = "S" # Scissors beats Paper
else:
output = "R" # Rock beats Scissors