

def evaluate_rastrigin(candidates, args):
    fitness = []
    for cs in candidates:
        fit = ((10 * len(cs)) + sum([(((x - 1) ** 2) - (10 * math.cos(((2 * math.pi) * (x - 1))))) for x in cs]))
        fitness.append(fit)
    return fitness

dataset/ETHPy150Open aarongarrett/inspyred/examples/advanced/parallel_evaluation_mp_example.py evaluate_rastrigin/original