From b4d9ea26bf0eadfe3554f8b29025e98f86e72573 Mon Sep 17 00:00:00 2001 From: George Lacey Date: Sat, 23 Sep 2017 19:08:49 +0100 Subject: [PATCH] Don't return fitness --- src/individual.py | 1 - src/main.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/individual.py b/src/individual.py index 2372a2b..80aba05 100644 --- a/src/individual.py +++ b/src/individual.py @@ -15,7 +15,6 @@ class Individual(object): y = self.y n = 9 self.fitness = pow(15*x*y*(1-x)*(1-y)*sin(n*pi*x)*sin(n*pi*y), 2) - return self.fitness def crossover(self, spouse): temp = self.x diff --git a/src/main.py b/src/main.py index 9993962..fa62d5a 100644 --- a/src/main.py +++ b/src/main.py @@ -6,5 +6,3 @@ args.add_argument("pop", help="Population size", type=int) args = args.parse_args() pop = Population(10) - -print("%d" % pop.fitness_function())