<s> import random <EOL> from axelrod import Actions , Player , random_choice <EOL> class AverageCopier ( Player ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> classifier = { <EOL> '<STR_LIT>' : float ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : set ( ) , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : False <EOL> } <EOL> @ staticmethod <EOL> def strategy ( opponent ) : <EOL> if len ( opponent . history ) == <NUM_LIT:0> : <EOL> return random_choice ( <NUM_LIT:0.5> ) <EOL> p = opponent . cooperations // len ( opponent . history ) <EOL> return random_choice ( p ) <EOL> class NiceAverageCopier ( Player ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> classifier = { <EOL> '<STR_LIT>' : float ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : set ( ) , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : False <EOL> } <EOL> @ staticmethod <EOL> def strategy ( opponent ) : <EOL> if len ( opponent . history ) == <NUM_LIT:0> : <EOL> return Actions . C <EOL> p = opponent . cooperations // len ( opponent . history ) <EOL> return random_choice ( p ) </s>
