Initializes a particle within a domain.
    Args:
        rng: numpy.random.RandomState: The random number generator.
        domain: cipy.problems.core.Domain: The domain of the problem.

    Returns:
        cipy.algorithms.pso.Particle: A new, fully initialized particle.

def initialize_particle(rng, domain, fitness_function):
    """ Initializes a particle within a domain.
    Args:
        rng: numpy.random.RandomState: The random number generator.
        domain: cipy.problems.core.Domain: The domain of the problem.

    Returns:
        cipy.algorithms.pso.Particle: A new, fully initialized particle.
    """
    position = rng.uniform(domain.lower, domain.upper, domain.dimension)
    fitness = fitness_function(position)
    return Particle(position=position,
                    velocity=np.zeros(domain.dimension),
                    fitness=fitness,
                    best_fitness=fitness,
                    best_position=position)