Fixed bug/typo

This commit is contained in:
SimpleArt
2020-12-03 17:00:32 -05:00
parent 169c204296
commit 6d0ec0c30e

View File

@ -142,7 +142,7 @@ class Crossover_Methods:
"""Cross two parents by swapping all genes randomly.""" """Cross two parents by swapping all genes randomly."""
for gene_pair in zip(parent_1, parent_2): for gene_pair in zip(parent_1, parent_2):
yield random.choice(gene_pair, cum_weights = [weight, 1]) yield random.choices(gene_pair, cum_weights = [weight, 1])[0]
class Arithmetic: class Arithmetic: