Skip to content

Commit

Permalink
fix to allow mutations to actually occur to an individual
Browse files Browse the repository at this point in the history
  • Loading branch information
jgh9094 committed Nov 2, 2023
1 parent eddc07f commit 51ba132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tpot2/population.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ def create_offspring2(self, parents_list, var_op_list, mutation_functions,mutati

for parents, var_op in zip(parents_list,var_op_list):
#TODO put this loop in population class
if var_op == "mutation":
if var_op == "mutate":
mutation_op = rng.choice(mutation_functions, p=mutation_function_weights)
all_offspring.append(copy_and_mutate(parents, mutation_op, rng_=rng))
all_offspring.append(copy_and_mutate(parents[0], mutation_op, rng_=rng))
chosen_ops.append(mutation_op.__name__)


Expand Down

0 comments on commit 51ba132

Please sign in to comment.