Weighted Random

AuthorVitali
Submission date2013-10-07 13:22:51.582909
Rating5960
Matches played660
Win rate57.58

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

Source code:

import random

if input == "":
    rock = paper = scissors = 1

elif input == "R":
	paper += 1
elif input == "P":
	scissors += 1
elif input == "S":
	rock += 1


selection_list = ["R"] *  rock  + ["P"] * paper + ["S"] * scissors

output  = random.choice(selection_list)