Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ class GeneticAlgorithm:
|
|
45 |
self.population = [self.population[i] for i in np.argsort(fitness)[-len(self.population)//2:]]
|
46 |
|
47 |
def crossover(self):
|
48 |
-
|
49 |
for _ in range(len(self.population)//2):
|
50 |
parent1, parent2 = random.sample(self.population, 2)
|
51 |
child = Net()
|
|
|
45 |
self.population = [self.population[i] for i in np.argsort(fitness)[-len(self.population)//2:]]
|
46 |
|
47 |
def crossover(self):
|
48 |
+
offspring = []
|
49 |
for _ in range(len(self.population)//2):
|
50 |
parent1, parent2 = random.sample(self.population, 2)
|
51 |
child = Net()
|