def best_of_generation(fitness, eq, population):
    """
    Selects the best individual of its generation
    :param fitness: fitness function
    :param eq: equation to maximize
    :param population: list of individuals (numpy array)
    :return: tuple of numpy vector best individual and best value
    """
    best = fitness(eq, population[0])
    best_value = -9999999
    history = [0]
    for p in population:
        if fitness(eq, p) > best_value:
            best = p
            best_value = fitness(eq, p)
            history.append(best_value)
    return best, best_value