January 2020
Intermediate to advanced
346 pages
9h 8m
English
The genetic algorithm-based program we created for finding a single minimum of Himmelblau's function resides in the Python 02-optimize-himmelblau.py program, located at:
The program is similar to the one we used for optimizing the Eggholder function, with a few differences highlighted as follows:
BOUND_LOW, BOUND_UP = -5.0, 5.0 # boundaries for all dimensions
def himmelblau(individual): x = individual[0] y = individual[1] f = (x ** 2 + y - 11) ** ...
Read now
Unlock full access