def rosenbrock(phenome):
    """The bare-bones Rosenbrock function."""
    ret = 0.0
    for i in range(len(phenome) - 1):
        x = phenome[i]
        ret += 100.0 * (x ** 2 - phenome[i+1]) ** 2 + (x - 1.0) ** 2
    return ret