Update attributes.py

This commit is contained in:
SimpleArt
2020-12-11 14:05:28 -05:00
parent 3adef48b54
commit a3bff6879d

View File

@ -187,7 +187,13 @@ class Attributes:
def numeric_chromosomes(self):
"""Sets default numerical based methods"""
# Adapt every 10th generation
self.adapt_rate = 0.10
# Use averaging for crossover
self.crossover_individual_impl = Crossover_Methods.Individual.Arithmetic.average
# Euclidean norm
self.dist = lambda chromosome_1, chromosome_2:\
sqrt(sum(
(gene_1.value - gene_2.value) ** 2