Author | cjfaure |
Submission date | 2014-08-30 13:36:30.972765 |
Rating | 3036 |
Matches played | 550 |
Win rate | 30.18 |
Use rpsrunner.py to play unranked matches on your computer.
# Necklacebot
#
# I chose this name because...
#
# It tries to tie.
# Geddit? :D
#
# By cjfaure.
import random
if input: # not the first round
history[1] += input
sf = sorted("RPS", key=lambda x: (history[1][::-1]+"PSR").index(x))
history[0] += random.choice(sf[0]+sf[2])
else: # initialize ALL da variables!
history = [random.choice("RPS"), ""]
output = history[0][-1]