Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 41 additions & 11 deletions team8.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,47 @@
# move: A function that returns 'c' or 'b'
####

team_name = 'The name the team gives to itself' # Only 10 chars displayed.
strategy_name = 'The name the team gives to this strategy'
strategy_description = 'How does this strategy decide?'
team_name = 'Bri lmao' # Only 10 chars displayed.
strategy_name = 'Wizard'
strategy_description = 'Looks at patterns in the others history and tries to repond accordingly'
import random
def move(my_history, their_history, my_score, their_score):
''' Arguments accepted: my_history, their_history are strings.
my_score, their_score are ints.

Make my move.
Returns 'c' or 'b'.
'''
if len(their_history)<20:
return random.choice(['c', 'b' ])
elif their_history[-3]==('b' , 'c' ,'b'):
return 'b'
elif their_history[-3]==('b', 'b' , 'b'):
return 'b'
elif their_history[-3]==('c' , 'c' , 'c'):
return 'c'
else:
return 'b'
if my_history[-3]==('b' , 'b' , 'b'):
return 'c'
else:
return 'b'
















# ''' Arguments accepted: my_history, their_history are strings.
# my_score, their_score are ints.
#
# Make my move.
# Returns 'c' or 'b'.
# '''

# my_history: a string with one letter (c or b) per round that has been played with this opponent.
# their_history: a string of the same length as history, possibly empty.
Expand All @@ -26,7 +56,7 @@ def move(my_history, their_history, my_score, their_score):
# Analyze my_history and their_history and/or my_score and their_score.
# Decide whether to return 'c' or 'b'.

return 'c'
# return 'c'


def test_move(my_history, their_history, my_score, their_score, result):
Expand Down