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

#start_main
dataset/ETHPy150Open aarongarrett/inspyred/docs/rastrigin.py/evaluate_rastrigin/original