import math


def cone(individual, position, height, width):
    """The cone peak function to be used with scenario 2 and 3.
    
    :math:`f(\mathbf{x}) = h - w \sqrt{\sum_{i=1}^N (x_i - p_i)^2}`
    
    """
    value = 0.0
    for x, p in zip(individual, position):
        value += (x - p)**2
    return height - width * math.sqrt(value)