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 e7a417a commit 3d17060Copy full SHA for 3d17060
genetic_algorithm/knapsack.py
@@ -266,7 +266,7 @@ def run_ga(
266
"""
267
population = [random_genome(len(items)) for _ in range(pop_size)]
268
best_fitness_history: list[int] = [] # track best fitness per generation
269
- avg_fitness_history: list[int] = []
+ avg_fitness_history: list[float] = []
270
best_genome_overall: genome_t = []
271
best_fitness_overall: int = -1
272
0 commit comments