Mar-10-2022, 09:36 AM
"fitness_function(position)" expects an array (or list or any iterable) of exactly 15 elements. When you do:
fitness_function(particle_position_vector[i])... you are only passing one element. So I guess you have to pass the whole array, like this:
fitness_function(particle_position_vector)Note that there have to be 15 elements, so the only correct answer to:
input("Inform the number of particles: ")... is 15.