We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe78a0e commit c96879fCopy full SHA for c96879f
gui/tsp.py
@@ -260,7 +260,7 @@ def fitness_fn(state):
260
while True:
261
population = [mutate(recombine(*select(2, population, fitness_fn)), self.mutation_rate.get())
262
for _ in range(len(population))]
263
- current_best = np.argmax(population, key=fitness_fn)
+ current_best = utils.argmax_random_ties(population, key=fitness_fn)
264
if fitness_fn(current_best) > fitness_fn(all_time_best):
265
all_time_best = current_best
266
self.cost.set("Cost = " + str('%0.3f' % (-1 * problem.value(all_time_best))))
0 commit comments