rps_bot

Authorjacket
Submission date2017-12-04 17:31:55.003890
Rating4916
Matches played315
Win rate48.89

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

Source code:

import random 
countRock = 0
countPaper = 0
countScissors = 0
   
input = [] #This is the user's input as string

##########Checks the User's overall preference of r, p or s
    
if len(input)%8 == 0:
    if  countRock > countPaper and countRock > countScissors:
        output = "P" #paper beats rock
    if  countRock < countPaper < countScissors:
        output = "R" #rock beats scissors 
    if  countRock < countPaper > countScissors:
        output = "S" #scissors beats paper
    else: 
        output = random.choice(["R","P","S"]) #randomized!