8000 Supporting multiple mutations. · ahmedfiz/GeneticAlgorithmPython@6123e42 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6123e42

Browse files
authored
Supporting multiple mutations.
Supporting applying the mutation operation for more than 1 gene using the num_mutations argument in the mutation() function.
1 parent 7a978a7 commit 6123e42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Example_GeneticAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
print(offspring_crossover)
6565

6666
# Adding some variations to the offspring using mutation.
67-
offspring_mutation = GA.mutation(offspring_crossover)
67+
offspring_mutation = GA.mutation(offspring_crossover, num_mutations=2)
6868
print("Mutation")
6969
print(offspring_mutation)
7070

0 commit comments

Comments
 (0)
0