diff --git a/team8.py b/team8.py index 972134e..7a38768 100644 --- a/team8.py +++ b/team8.py @@ -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. @@ -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):