Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ class GeneticAlgorithm:
|
|
52 |
self.population = [self.population[i] for i in np.argsort(fitness)[-self.population_size//2:]]
|
53 |
|
54 |
def crossover(self):
|
55 |
-
|
56 |
for _ in range(self.population_size//2):
|
57 |
parent1, parent2 = random.sample(self.population, 2)
|
58 |
child = Net()
|
|
|
52 |
self.population = [self.population[i] for i in np.argsort(fitness)[-self.population_size//2:]]
|
53 |
|
54 |
def crossover(self):
|
55 |
+
offspring = []
|
56 |
for _ in range(self.population_size//2):
|
57 |
parent1, parent2 = random.sample(self.population, 2)
|
58 |
child = Net()
|