Skip to content

Commit bfb6b13

Browse files
committed
FIXED GA: Removed hard assertions to avoid breaking program
1 parent 18a1aee commit bfb6b13

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

search/genetic_algorithm.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,6 @@ def evaluate_population(evals_done, params, eval_cache):
206206
child = self._crossover(parent1, parent2, n=1)
207207
offspring.append(child)
208208
attempts += 1
209-
# A Brief Checking
210-
assert len(offspring) <= max_offspring, f"Number of Offsprings {len(offspring)} should not exceed the allowed maximum of {max_offspring}"
211209

212210
# 3. Mutation
213211
# We get a list of mutated children from crossover offsprings

0 commit comments

Comments
 (0)