def _update_fitness(self, action_set):
<EOL>total_accuracy = <NUM_LIT:0><EOL>accuracies = {}<EOL>for rule in action_set:<EOL><INDENT>if rule.error < self.error_threshold:<EOL><INDENT>accuracy = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>accuracy = (<EOL>self.accuracy_coefficient *<EOL>(rule.error / self.error_threshold) **<EOL>-self.accuracy_power<EOL>)<EOL><DEDENT>accuracies[rule] = accuracy<EOL>total_accuracy += accuracy * rule.numerosity<EOL><DEDENT>total_accuracy = total_accuracy or <NUM_LIT:1><EOL>for rule in action_set:<EOL><INDENT>accuracy = accuracies[rule]<EOL>rule.fitness += (<EOL>self.learning_rate *<EOL>(accuracy * rule.numerosity / total_accuracy -<EOL>rule.fitness)<EOL>)<EOL><DEDENT>
Update the fitness values of the rules belonging to this action
        set.