From a3bff6879d499ca238d6fe176eac2b2c442120c8 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Fri, 11 Dec 2020 14:05:28 -0500 Subject: [PATCH] Update attributes.py --- src/attributes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/attributes.py b/src/attributes.py index e5137b3..36a54a3 100644 --- a/src/attributes.py +++ b/src/attributes.py @@ -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