Skip to content

Instantly share code, notes, and snippets.

@rocreguant
Created January 31, 2021 16:35
Show Gist options
  • Save rocreguant/a46f0df0d499528cdadf4d1f218e2f4c to your computer and use it in GitHub Desktop.
Save rocreguant/a46f0df0d499528cdadf4d1f218e2f4c to your computer and use it in GitHub Desktop.
def get_all_fitnes(population_set, objects_dict):
fitnes_list = np.zeros(n_population)
#Looping over all solutions computing the fitness for each solution
for i in range(n_population):
_, fitnes_list[i] = get_current_weight_value(population_set[i], objects_dict)
return fitnes_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment