From 2a99fdbf131f7b3c558351c62c01ab62c195a9a5 Mon Sep 17 00:00:00 2001 From: George Lacey Date: Thu, 21 Sep 2017 15:23:10 +0100 Subject: [PATCH] Implement fitness function --- src/individual.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/individual.py diff --git a/src/individual.py b/src/individual.py new file mode 100644 index 0000000..c826fc7 --- /dev/null +++ b/src/individual.py @@ -0,0 +1,6 @@ +from math import pow, sin, pi + + +def fitness_function(x, y): + n = 9 + return pow(15*x*y*(1-x)*(1-y)*sin(n*pi*x)*sin(n*pi*y), 2) \ No newline at end of file