<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def eval_fitness(self, chromosome):
 """ Convert a 1-gene chromosome into an integer and calculate its fitness by checking it against each required factor. return: fitness value """

        score = 0

        number = self.translator.translate_gene(chromosome.genes[0])

        for factor in self.factors:
            if number % factor == 0:
                score += 1
            else:
                score -= 1

        # check for optimal solution
        if score == len(self.factors):
            min_product = functools.reduce(lambda a,b: a * b, self.factors)

            if number + min_product > self.max_encoded_val:
                print("Found best solution:", number)
                self.found_best = True

        # scale number of factors achieved/missed by ratio of
        # the solution number to the maximum possible integer
        # represented by binary strings of the given length
        return score * number / self.max_encoded_val