def griewank(individual):
 return (((((1.0 / 4000.0) * sum(((x ** 2) for x in individual))) - reduce(mul, (cos((x / sqrt((i + 1.0)))) for (i, x) in enumerate(individual)), 1)) + 1),)

def griewank ( individual ) : return ( ( ( ( ( 1.0 / 4000.0 ) * sum ( ( ( x ** 2 ) for x in individual ) ) ) - reduce ( mul , ( cos ( ( x / sqrt ( ( i + 1.0 ) ) ) ) for ( i , x ) in enumerate ( individual ) ) , 1 ) ) + 1 ) , )
griewank test objective function .