forked fromahmedfgad/GeneticAlgorithmPython
- Notifications
You must be signed in to change notification settings - Fork0
Commit5ed45bd
authored
Prevent duplicates in the genes
A new bool parameter called allow_duplicate_genes is supported. If True, then a solution/chromosome may have duplicate gene values. If False, then each gene will have a unique value in its solution.This behavior is not guaranteed when a gene is assigned a dict in the gene_space parameter. For example, the last gene here (gene_space=[[7, 8, 9], [9, 8, 7], {"low": 7, "high": 10}]) is assigned a dictionary. As a result, it may have duplicate values even if allow_duplicate_genes=False.1 parent992ba51 commit5ed45bd
1 file changed
+268
-29
lines changed0 commit comments
Comments
(0)