You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If save_best_solutions = True, the best_solutions list is overwritten after each generation when a new population is being generated. A bug appears on line number 748. Solutions stored in best_solutions are probably just shallow copies, i.e., pointers to population.
What the bug looks like
best_solutions = [] best_solutions = [[9, 10, 5, 9, 9]] # after append on the line 728, it holds first best solution found best_solutions = [[6, 9, 6, 9, 6]] # after the line 748, original value has been changed (changed after every single generation)
The text was updated successfully, but these errors were encountered:
Description
If
save_best_solutions = True
, thebest_solutions
list is overwritten after each generation when a new population is being generated. A bug appears on line number 748. Solutions stored inbest_solutions
are probably just shallow copies, i.e., pointers topopulation
.What the bug looks like
best_solutions = []
best_solutions = [[9, 10, 5, 9, 9]]
# after append on the line 728, it holds first best solution foundbest_solutions = [[6, 9, 6, 9, 6]]
# after the line 748, original value has been changed (changed after every single generation)The text was updated successfully, but these errors were encountered: