less_is_good

This program has been disqualified.


Authorleowu2017
Submission date2017-12-02 18:17:44.983230
Rating5000
Matches played0
Win rate0

Source code:

import random

if not input:
    his_len = 10
    his = [''] * his_len
    output = random.choice("RPC")
else:
    his = his[1:] + [input]
    R_num = (his.count('R'), 'R')
    P_num = (his.count('P'), 'P')
    S_num = (his.count('S'), 'S')
    min_val = min(R_num, P_num, S_num)[0]
    min_ind = [x[1] for x in [R_num, P_num, S_num] if x[0] == min_val]
    output = random.choice(min_ind)