-
-
Notifications
You must be signed in to change notification settings - Fork 489
IndexError in the best_solution function in line 3124 #93
-
After some time running the GA function ga_instance.run(), a IndexError occur in the following line:
best_match_idx = numpy.where(pop_fitness == numpy.max(pop_fitness))[0][0]
Has anyone come across this index error before? How did you resolve it?
After I modified the fitness parameters to a more appropriate setting I was able to get GA to run for longer, however the Index error still persists.
Thanks for anyone's help.
Beta Was this translation helpful? Give feedback.
All reactions
Problem fixed changing keep_parents from 1 to -1.
I think the problem was the population size decreasing to 0.
Replies: 2 comments 1 reply
-
It it possible to share the code?
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thanks. Problem fixed change keep_parents from 1 to -1.
Beta Was this translation helpful? Give feedback.
All reactions
-
Problem fixed changing keep_parents from 1 to -1.
I think the problem was the population size decreasing to 0.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2