def __call__(self, match_set):
assert isinstance(match_set, MatchSet)<EOL>if random.random() < self.epsilon:<EOL><INDENT>return random.choice(list(match_set))<EOL><DEDENT>best_actions = match_set.best_actions<EOL>if len(best_actions) == <NUM_LIT:1>:<EOL><INDENT>return best_actions[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>return random.choice(best_actions)<EOL><DEDENT>
Defining this allows the object to be used like a function.