Note
Click here to download the full example code
Example for evolutionary regression using NumPy¶
Example demonstrating the use of Cartesian genetic programming for two regression tasks using NumPy to vectorized function evaluations.
# The docopt str is added explicitly to ensure compatibility with
# sphinx-gallery.
docopt_str = """
Usage:
example_evo_regression_numpy.py [--max-generations=<N>]
Options:
-h --help
--max-generations=<N> Maximum number of generations [default: 1000]
"""
import functools
import warnings
import matplotlib.pyplot as plt
import numpy as np
import scipy.constants
from docopt import docopt
import cgp
args = docopt(docopt_str)
We first define target functions. For illustration purposes, we define two functions which present different levels of difficulty for the search.
def f_target_easy(x):
return x[:, 0] ** 2 + 2 * x[:, 0] * x[:, 1] + x[:, 1] ** 2
def f_target_hard(x):
return 1.0 + 1.0 / (x[:, 0] + x[:, 1])
Then we define the objective function for the evolution. It uses the mean-squared error between the expression represented by a given individual and the target function evaluated on a set of random points.
def objective(individual, target_function, seed):
"""Objective function of the regression task.
Parameters
----------
individual : Individual
Individual of the Cartesian Genetic Programming Framework.
target_function : Callable
Target function.
Returns
-------
Individual
Modified individual with updated fitness value.
"""
if not individual.fitness_is_None():
return individual
n_function_evaluations = 1000
np.random.seed(seed)
f = individual.to_numpy() # generate a NumPy compatible function
x = np.random.uniform(-4, 4, size=(n_function_evaluations, 2))
with warnings.catch_warnings(): # ignore warnings due to zero division
warnings.filterwarnings("ignore", message="divide by zero encountered in true_divide")
warnings.filterwarnings("ignore", message="invalid value encountered in")
try:
y = f(x[:, 0], x[:, 1]) # pass a vector of values to the function
except ZeroDivisionError:
individual.fitness = -np.inf
return individual
loss = np.mean((target_function(x) - y) ** 2)
individual.fitness = -loss
return individual
Next, we define the main loop of the evolution. To easily execute it for different target functions, we wrap it into a function here. It comprises:
defining the parameters for the population, the genome of individuals, and the evolutionary algorithm.
creating a Population instance and instantiating the evolutionary algorithm.
defining a recording callback closure for bookkeeping of the progression of the evolution.
Finally, we call the evolve method to perform the evolutionary search.
def evolution(f_target):
"""Execute CGP on a regression task for a given target function.
Parameters
----------
f_target : Callable
Target function
Returns
-------
dict
Dictionary containing the history of the evolution
Individual
Individual with the highest fitness in the last generation
"""
population_params = {"n_parents": 10, "seed": 1234}
genome_params = {
"n_inputs": 2,
"n_outputs": 1,
"n_columns": 12,
"n_rows": 2,
"levels_back": 5,
"primitives": (cgp.Add, cgp.Sub, cgp.Mul, cgp.Div, cgp.ConstantFloat),
}
ea_params = {"n_offsprings": 10, "tournament_size": 2, "mutation_rate": 0.03, "n_processes": 2}
evolve_params = {"max_generations": int(args["--max-generations"]), "termination_fitness": 0.0}
# create population that will be evolved
pop = cgp.Population(**population_params, genome_params=genome_params)
# create instance of evolutionary algorithm
ea = cgp.ea.MuPlusLambda(**ea_params)
# define callback for recording of fitness over generations
history = {}
history["fitness_parents"] = []
def recording_callback(pop):
history["fitness_parents"].append(pop.fitness_parents())
# the objective passed to evolve should only accept one argument,
# the individual
obj = functools.partial(objective, target_function=f_target, seed=population_params["seed"])
# Perform the evolution
cgp.evolve(obj, pop, ea, **evolve_params, print_progress=True, callback=recording_callback)
return history, pop.champion
We execute the evolution for the two different target functions (‘easy’ and ‘hard’). After finishing the evolution, we plot the result and log the final evolved expression.
if __name__ == "__main__":
width = 9.0
fig, axes = plt.subplots(2, 2, figsize=(width, width / scipy.constants.golden))
for i, (label, target_function) in enumerate(
zip(["easy", "hard"], [f_target_easy, f_target_hard])
):
history, champion = evolution(target_function)
ax_fitness, ax_function = axes[i]
ax_fitness.set_xlabel("Generation")
ax_fitness.set_ylabel("Fitness")
history_fitness = np.array(history["fitness_parents"])
ax_fitness.plot(np.max(history_fitness, axis=1), label="Champion")
ax_fitness.plot(np.mean(history_fitness, axis=1), label="Population mean")
ax_fitness.set_yscale("symlog")
ax_fitness.set_ylim(-1.0e4, 0.0)
ax_fitness.legend()
f_graph = champion.to_func()
x_0_range = np.linspace(-5.0, 5.0, 20)
x_1_range = np.ones_like(x_0_range) * 2.0
# fix x_1 such than 1d plot makes sense
y = [f_graph(x_0, x_1_range[0]) for x_0 in x_0_range]
y_target = target_function(np.hstack([x_0_range.reshape(-1, 1), x_1_range.reshape(-1, 1)]))
ax_function.plot(x_0_range, y_target, lw=2, alpha=0.5, label="Target")
ax_function.plot(x_0_range, y, "x", label="Champion")
ax_function.legend()
ax_function.set_ylabel(r"$f(x)$")
ax_function.set_xlabel(r"$x$")
fig.savefig("example_evo_regression_numpy.pdf")
![example evo regression numpy](../_images/sphx_glr_example_evo_regression_numpy_001.png)
Out:
[2/1000] max fitness: -308.6949375923162[K
[3/1000] max fitness: -197.92390450707197[K
[4/1000] max fitness: -197.92390450707197[K
[5/1000] max fitness: -197.92390450707197[K
[6/1000] max fitness: -197.92390450707197[K
[7/1000] max fitness: -197.92390450707197[K
[8/1000] max fitness: -197.92390450707197[K
[9/1000] max fitness: -197.92390450707197[K
[10/1000] max fitness: -197.92390450707197[K
[11/1000] max fitness: -197.92390450707197[K
[12/1000] max fitness: -197.92390450707197[K
[13/1000] max fitness: -197.92390450707197[K
[14/1000] max fitness: -197.92390450707197[K
[15/1000] max fitness: -197.92390450707197[K
[16/1000] max fitness: -197.92390450707197[K
[17/1000] max fitness: -197.92390450707197[K
[18/1000] max fitness: -197.92390450707197[K
[19/1000] max fitness: -197.92390450707197[K
[20/1000] max fitness: -197.92390450707197[K
[21/1000] max fitness: -197.92390450707197[K
[22/1000] max fitness: -197.92390450707197[K
[23/1000] max fitness: -196.25090344778826[K
[24/1000] max fitness: -196.25090344778826[K
[25/1000] max fitness: -196.25090344778826[K
[26/1000] max fitness: -196.25090344778826[K
[27/1000] max fitness: -196.25090344778826[K
[28/1000] max fitness: -196.25090344778826[K
[29/1000] max fitness: -196.25090344778826[K
[30/1000] max fitness: -196.25090344778826[K
[31/1000] max fitness: -196.25090344778826[K
[32/1000] max fitness: -196.25090344778826[K
[33/1000] max fitness: -196.25090344778826[K
[34/1000] max fitness: -196.25090344778826[K
[35/1000] max fitness: -196.25090344778826[K
[36/1000] max fitness: -196.25090344778826[K
[37/1000] max fitness: -196.25090344778826[K
[38/1000] max fitness: -196.25090344778826[K
[39/1000] max fitness: -196.25090344778826[K
[40/1000] max fitness: -196.25090344778826[K
[41/1000] max fitness: -196.25090344778826[K
[42/1000] max fitness: -196.25090344778826[K
[43/1000] max fitness: -196.25090344778826[K
[44/1000] max fitness: -196.25090344778826[K
[45/1000] max fitness: -196.25090344778826[K
[46/1000] max fitness: -196.25090344778826[K
[47/1000] max fitness: -196.25090344778826[K
[48/1000] max fitness: -196.25090344778826[K
[49/1000] max fitness: -196.25090344778826[K
[50/1000] max fitness: -196.25090344778826[K
[51/1000] max fitness: -196.25090344778826[K
[52/1000] max fitness: -196.25090344778826[K
[53/1000] max fitness: -196.25090344778826[K
[54/1000] max fitness: -196.25090344778826[K
[55/1000] max fitness: -196.25090344778826[K
[56/1000] max fitness: -196.25090344778826[K
[57/1000] max fitness: -196.25090344778826[K
[58/1000] max fitness: -196.25090344778826[K
[59/1000] max fitness: -196.25090344778826[K
[60/1000] max fitness: -196.25090344778826[K
[61/1000] max fitness: -196.25090344778826[K
[62/1000] max fitness: -196.25090344778826[K
[63/1000] max fitness: -196.25090344778826[K
[64/1000] max fitness: -196.25090344778826[K
[65/1000] max fitness: -196.25090344778826[K
[66/1000] max fitness: -196.25090344778826[K
[67/1000] max fitness: -196.25090344778826[K
[68/1000] max fitness: -196.25090344778826[K
[69/1000] max fitness: -196.25090344778826[K
[70/1000] max fitness: -196.25090344778826[K
[71/1000] max fitness: -196.25090344778826[K
[72/1000] max fitness: -196.25090344778826[K
[73/1000] max fitness: -196.25090344778826[K
[74/1000] max fitness: -196.25090344778826[K
[75/1000] max fitness: -196.25090344778826[K
[76/1000] max fitness: -196.25090344778826[K
[77/1000] max fitness: -196.25090344778826[K
[78/1000] max fitness: -196.25090344778826[K
[79/1000] max fitness: -196.25090344778826[K
[80/1000] max fitness: -196.25090344778826[K
[81/1000] max fitness: -196.25090344778826[K
[82/1000] max fitness: -196.25090344778826[K
[83/1000] max fitness: -196.25090344778826[K
[84/1000] max fitness: -196.25090344778826[K
[85/1000] max fitness: -196.25090344778826[K
[86/1000] max fitness: -196.25090344778826[K
[87/1000] max fitness: -196.25090344778826[K
[88/1000] max fitness: -196.25090344778826[K
[89/1000] max fitness: -196.25090344778826[K
[90/1000] max fitness: -196.25090344778826[K
[91/1000] max fitness: -196.25090344778826[K
[92/1000] max fitness: -196.25090344778826[K
[93/1000] max fitness: -196.25090344778826[K
[94/1000] max fitness: -196.25090344778826[K
[95/1000] max fitness: -196.25090344778826[K
[96/1000] max fitness: -196.25090344778826[K
[97/1000] max fitness: -196.25090344778826[K
[98/1000] max fitness: -196.25090344778826[K
[99/1000] max fitness: -196.25090344778826[K
[100/1000] max fitness: -196.25090344778826[K
[101/1000] max fitness: -196.25090344778826[K
[102/1000] max fitness: -196.25090344778826[K
[103/1000] max fitness: -196.25090344778826[K
[104/1000] max fitness: -196.25090344778826[K
[105/1000] max fitness: -196.25090344778826[K
[106/1000] max fitness: -196.25090344778826[K
[107/1000] max fitness: -196.25090344778826[K
[108/1000] max fitness: -196.25090344778826[K
[109/1000] max fitness: -196.25090344778826[K
[110/1000] max fitness: -196.25090344778826[K
[111/1000] max fitness: -196.25090344778826[K
[112/1000] max fitness: -196.25090344778826[K
[113/1000] max fitness: -196.25090344778826[K
[114/1000] max fitness: -196.25090344778826[K
[115/1000] max fitness: -196.25090344778826[K
[116/1000] max fitness: -196.25090344778826[K
[117/1000] max fitness: -196.25090344778826[K
[118/1000] max fitness: -196.25090344778826[K
[119/1000] max fitness: -196.25090344778826[K
[120/1000] max fitness: -196.25090344778826[K
[121/1000] max fitness: -196.25090344778826[K
[122/1000] max fitness: -196.25090344778826[K
[123/1000] max fitness: -196.25090344778826[K
[124/1000] max fitness: -196.25090344778826[K
[125/1000] max fitness: -196.25090344778826[K
[126/1000] max fitness: -196.25090344778826[K
[127/1000] max fitness: -196.25090344778826[K
[128/1000] max fitness: -196.25090344778826[K
[129/1000] max fitness: -196.25090344778826[K
[130/1000] max fitness: -196.25090344778826[K
[131/1000] max fitness: -196.25090344778826[K
[132/1000] max fitness: -196.25090344778826[K
[133/1000] max fitness: -196.25090344778826[K
[134/1000] max fitness: -196.25090344778826[K
[135/1000] max fitness: -196.25090344778826[K
[136/1000] max fitness: -196.25090344778826[K
[137/1000] max fitness: -196.25090344778826[K
[138/1000] max fitness: -196.25090344778826[K
[139/1000] max fitness: -196.25090344778826[K
[140/1000] max fitness: -196.25090344778826[K
[141/1000] max fitness: -196.25090344778826[K
[142/1000] max fitness: -196.25090344778826[K
[143/1000] max fitness: -196.25090344778826[K
[144/1000] max fitness: -196.25090344778826[K
[145/1000] max fitness: -196.25090344778826[K
[146/1000] max fitness: -196.25090344778826[K
[147/1000] max fitness: -196.25090344778826[K
[148/1000] max fitness: -196.25090344778826[K
[149/1000] max fitness: -196.25090344778826[K
[150/1000] max fitness: -196.25090344778826[K
[151/1000] max fitness: -196.25090344778826[K
[152/1000] max fitness: -196.25090344778826[K
[153/1000] max fitness: -196.25090344778826[K
[154/1000] max fitness: -196.25090344778826[K
[155/1000] max fitness: -196.25090344778826[K
[156/1000] max fitness: -196.25090344778826[K
[157/1000] max fitness: -196.25090344778826[K
[158/1000] max fitness: -196.25090344778826[K
[159/1000] max fitness: -196.25090344778826[K
[160/1000] max fitness: -196.25090344778826[K
[161/1000] max fitness: -196.25090344778826[K
[162/1000] max fitness: -196.25090344778826[K
[163/1000] max fitness: -196.25090344778826[K
[164/1000] max fitness: -196.25090344778826[K
[165/1000] max fitness: -196.25090344778826[K
[166/1000] max fitness: -196.25090344778826[K
[167/1000] max fitness: -196.25090344778826[K
[168/1000] max fitness: -196.25090344778826[K
[169/1000] max fitness: -196.25090344778826[K
[170/1000] max fitness: -196.25090344778826[K
[171/1000] max fitness: -196.25090344778826[K
[172/1000] max fitness: -196.25090344778826[K
[173/1000] max fitness: -196.25090344778826[K
[174/1000] max fitness: -196.25090344778826[K
[175/1000] max fitness: -196.25090344778826[K
[176/1000] max fitness: -196.25090344778826[K
[177/1000] max fitness: -196.25090344778826[K
[178/1000] max fitness: -196.25090344778826[K
[179/1000] max fitness: -196.25090344778826[K
[180/1000] max fitness: -196.25090344778826[K
[181/1000] max fitness: -196.25090344778826[K
[182/1000] max fitness: -196.25090344778826[K
[183/1000] max fitness: -196.25090344778826[K
[184/1000] max fitness: -193.93605127563035[K
[185/1000] max fitness: -193.93605127563035[K
[186/1000] max fitness: -193.93605127563035[K
[187/1000] max fitness: -193.93605127563035[K
[188/1000] max fitness: -150.90479599198036[K
[189/1000] max fitness: -150.90479599198036[K
[190/1000] max fitness: -150.90479599198036[K
[191/1000] max fitness: -150.90479599198036[K
[192/1000] max fitness: -150.90479599198036[K
[193/1000] max fitness: -150.90479599198036[K
[194/1000] max fitness: -150.90479599198036[K
[195/1000] max fitness: -150.90479599198036[K
[196/1000] max fitness: -150.90479599198036[K
[197/1000] max fitness: -48.32692873839731[K
[198/1000] max fitness: -48.32692873839731[K
[199/1000] max fitness: -48.32692873839731[K
[200/1000] max fitness: -48.32692873839731[K
[201/1000] max fitness: -48.32692873839731[K
[202/1000] max fitness: -48.32692873839731[K
[203/1000] max fitness: -48.32692873839731[K
[204/1000] max fitness: -47.66542015619477[K
[205/1000] max fitness: -47.66542015619477[K
[206/1000] max fitness: -47.66542015619477[K
[207/1000] max fitness: -47.66542015619477[K
[208/1000] max fitness: -46.99617444729604[K
[209/1000] max fitness: -46.99617444729604[K
[210/1000] max fitness: -46.99617444729604[K
[211/1000] max fitness: -46.99617444729604[K
[212/1000] max fitness: -46.99617444729604[K
[213/1000] max fitness: -46.99617444729604[K
[214/1000] max fitness: -46.996174447296035[K
[215/1000] max fitness: -46.996174447296035[K
[216/1000] max fitness: -46.996174447296035[K
[217/1000] max fitness: -46.996174447296035[K
[218/1000] max fitness: -46.996174447296035[K
[219/1000] max fitness: -46.996174447296035[K
[220/1000] max fitness: -46.996174447296035[K
[221/1000] max fitness: -46.996174447296035[K
[222/1000] max fitness: -46.996174447296035[K
[223/1000] max fitness: -46.996174447296035[K
[224/1000] max fitness: -46.996174447296035[K
[225/1000] max fitness: -46.996174447296035[K
[226/1000] max fitness: -46.996174447296035[K
[227/1000] max fitness: -46.996174447296035[K
[228/1000] max fitness: -46.996174447296035[K
[229/1000] max fitness: -46.996174447296035[K
[230/1000] max fitness: -46.996174447296035[K
[231/1000] max fitness: -46.996174447296035[K
[232/1000] max fitness: -46.996174447296035[K
[233/1000] max fitness: -46.996174447296035[K
[234/1000] max fitness: -46.996174447296035[K
[235/1000] max fitness: -46.996174447296035[K
[236/1000] max fitness: -46.996174447296035[K
[237/1000] max fitness: -46.996174447296035[K
[238/1000] max fitness: -46.996174447296035[K
[239/1000] max fitness: -46.996174447296035[K
[240/1000] max fitness: -46.996174447296035[K
[241/1000] max fitness: -46.996174447296035[K
[242/1000] max fitness: -46.996174447296035[K
[243/1000] max fitness: -46.996174447296035[K
[244/1000] max fitness: -46.996174447296035[K
[245/1000] max fitness: -46.996174447296035[K
[246/1000] max fitness: -46.996174447296035[K
[247/1000] max fitness: -46.996174447296035[K
[248/1000] max fitness: -46.996174447296035[K
[249/1000] max fitness: -46.996174447296035[K
[250/1000] max fitness: -46.996174447296035[K
[251/1000] max fitness: -46.996174447296035[K
[252/1000] max fitness: -46.996174447296035[K
[253/1000] max fitness: -46.996174447296035[K
[254/1000] max fitness: -46.996174447296035[K
[255/1000] max fitness: -46.996174447296035[K
[256/1000] max fitness: -46.996174447296035[K
[257/1000] max fitness: -46.996174447296035[K
[258/1000] max fitness: -46.996174447296035[K
[259/1000] max fitness: -46.996174447296035[K
[260/1000] max fitness: -46.996174447296035[K
[261/1000] max fitness: -46.996174447296035[K
[262/1000] max fitness: -46.996174447296035[K
[263/1000] max fitness: -46.996174447296035[K
[264/1000] max fitness: -46.996174447296035[K
[265/1000] max fitness: -46.996174447296035[K
[266/1000] max fitness: -46.996174447296035[K
[267/1000] max fitness: -46.996174447296035[K
[268/1000] max fitness: -46.996174447296035[K
[269/1000] max fitness: -46.996174447296035[K
[270/1000] max fitness: -46.996174447296035[K
[271/1000] max fitness: -46.996174447296035[K
[272/1000] max fitness: -46.996174447296035[K
[273/1000] max fitness: -46.996174447296035[K
[274/1000] max fitness: -46.996174447296035[K
[275/1000] max fitness: -46.996174447296035[K
[276/1000] max fitness: -46.996174447296035[K
[277/1000] max fitness: -46.996174447296035[K
[278/1000] max fitness: -46.996174447296035[K
[279/1000] max fitness: -46.996174447296035[K
[280/1000] max fitness: -46.996174447296035[K
[281/1000] max fitness: -46.996174447296035[K
[282/1000] max fitness: -46.996174447296035[K
[283/1000] max fitness: -46.996174447296035[K
[284/1000] max fitness: -46.996174447296035[K
[285/1000] max fitness: -46.996174447296035[K
[286/1000] max fitness: -46.996174447296035[K
[287/1000] max fitness: -46.996174447296035[K
[288/1000] max fitness: -46.996174447296035[K
[289/1000] max fitness: -46.996174447296035[K
[290/1000] max fitness: -46.996174447296035[K
[291/1000] max fitness: -46.996174447296035[K
[292/1000] max fitness: -46.996174447296035[K
[293/1000] max fitness: -46.996174447296035[K
[294/1000] max fitness: -46.996174447296035[K
[295/1000] max fitness: -46.996174447296035[K
[296/1000] max fitness: -46.996174447296035[K
[297/1000] max fitness: -46.996174447296035[K
[298/1000] max fitness: -46.996174447296035[K
[299/1000] max fitness: -46.996174447296035[K
[300/1000] max fitness: -46.996174447296035[K
[301/1000] max fitness: -46.996174447296035[K
[302/1000] max fitness: -46.996174447296035[K
[303/1000] max fitness: -46.996174447296035[K
[304/1000] max fitness: -46.996174447296035[K
[305/1000] max fitness: -46.996174447296035[K
[306/1000] max fitness: -46.996174447296035[K
[307/1000] max fitness: -46.996174447296035[K
[308/1000] max fitness: -46.996174447296035[K
[309/1000] max fitness: -46.996174447296035[K
[310/1000] max fitness: -46.996174447296035[K
[311/1000] max fitness: -46.996174447296035[K
[312/1000] max fitness: -46.996174447296035[K
[313/1000] max fitness: -46.996174447296035[K
[314/1000] max fitness: -46.996174447296035[K
[315/1000] max fitness: -46.996174447296035[K
[316/1000] max fitness: -46.996174447296035[K
[317/1000] max fitness: -46.996174447296035[K
[318/1000] max fitness: -46.996174447296035[K
[319/1000] max fitness: -46.996174447296035[K
[320/1000] max fitness: -46.996174447296035[K
[321/1000] max fitness: -46.996174447296035[K
[322/1000] max fitness: -46.996174447296035[K
[323/1000] max fitness: -46.996174447296035[K
[324/1000] max fitness: -46.996174447296035[K
[325/1000] max fitness: -46.996174447296035[K
[326/1000] max fitness: -46.996174447296035[K
[327/1000] max fitness: -46.996174447296035[K
[328/1000] max fitness: -46.996174447296035[K
[329/1000] max fitness: -46.996174447296035[K
[330/1000] max fitness: -46.996174447296035[K
[331/1000] max fitness: -46.996174447296035[K
[332/1000] max fitness: -46.996174447296035[K
[333/1000] max fitness: -46.996174447296035[K
[334/1000] max fitness: -46.996174447296035[K
[335/1000] max fitness: -46.996174447296035[K
[336/1000] max fitness: -46.996174447296035[K
[337/1000] max fitness: -46.996174447296035[K
[338/1000] max fitness: -46.996174447296035[K
[339/1000] max fitness: -46.996174447296035[K
[340/1000] max fitness: -46.996174447296035[K
[341/1000] max fitness: -46.996174447296035[K
[342/1000] max fitness: -46.996174447296035[K
[343/1000] max fitness: -46.996174447296035[K
[344/1000] max fitness: -46.996174447296035[K
[345/1000] max fitness: -46.996174447296035[K
[346/1000] max fitness: -46.996174447296035[K
[347/1000] max fitness: -46.996174447296035[K
[348/1000] max fitness: -46.996174447296035[K
[349/1000] max fitness: -46.996174447296035[K
[350/1000] max fitness: -46.996174447296035[K
[351/1000] max fitness: -46.996174447296035[K
[352/1000] max fitness: -46.996174447296035[K
[353/1000] max fitness: -46.996174447296035[K
[354/1000] max fitness: -46.996174447296035[K
[355/1000] max fitness: -46.996174447296035[K
[356/1000] max fitness: -46.996174447296035[K
[357/1000] max fitness: -46.996174447296035[K
[358/1000] max fitness: -46.996174447296035[K
[359/1000] max fitness: -46.996174447296035[K
[360/1000] max fitness: -46.996174447296035[K
[361/1000] max fitness: -46.996174447296035[K
[362/1000] max fitness: -46.996174447296035[K
[363/1000] max fitness: -46.996174447296035[K
[364/1000] max fitness: -46.996174447296035[K
[365/1000] max fitness: -46.996174447296035[K
[366/1000] max fitness: -46.996174447296035[K
[367/1000] max fitness: -46.996174447296035[K
[368/1000] max fitness: -46.996174447296035[K
[369/1000] max fitness: -46.996174447296035[K
[370/1000] max fitness: -46.996174447296035[K
[371/1000] max fitness: -46.996174447296035[K
[372/1000] max fitness: -46.996174447296035[K
[373/1000] max fitness: -46.996174447296035[K
[374/1000] max fitness: -46.996174447296035[K
[375/1000] max fitness: -46.996174447296035[K
[376/1000] max fitness: -46.996174447296035[K
[377/1000] max fitness: -4.481103373055989e-30[K
[2/1000] max fitness: -547.2055254740338[K
[3/1000] max fitness: -547.2055254740338[K
[4/1000] max fitness: -547.2055254740338[K
[5/1000] max fitness: -547.2055254740338[K
[6/1000] max fitness: -547.2055254740338[K
[7/1000] max fitness: -547.2055254740338[K
[8/1000] max fitness: -547.2055254740338[K
[9/1000] max fitness: -547.2055254740338[K
[10/1000] max fitness: -547.2055254740338[K
[11/1000] max fitness: -547.2055254740338[K
[12/1000] max fitness: -547.2055254740338[K
[13/1000] max fitness: -547.2055254740338[K
[14/1000] max fitness: -547.2055254740338[K
[15/1000] max fitness: -547.2055254740338[K
[16/1000] max fitness: -547.2055254740338[K
[17/1000] max fitness: -547.2055254740338[K
[18/1000] max fitness: -547.2055254740338[K
[19/1000] max fitness: -547.2055254740338[K
[20/1000] max fitness: -547.2055254740338[K
[21/1000] max fitness: -547.2055254740338[K
[22/1000] max fitness: -547.2055254740338[K
[23/1000] max fitness: -547.2055254740338[K
[24/1000] max fitness: -547.2055254740338[K
[25/1000] max fitness: -547.2055254740338[K
[26/1000] max fitness: -547.2055254740338[K
[27/1000] max fitness: -547.2055254740338[K
[28/1000] max fitness: -547.2055254740338[K
[29/1000] max fitness: -547.2055254740338[K
[30/1000] max fitness: -547.2055254740338[K
[31/1000] max fitness: -547.2055254740338[K
[32/1000] max fitness: -547.2055254740338[K
[33/1000] max fitness: -547.2055254740338[K
[34/1000] max fitness: -547.2055254740338[K
[35/1000] max fitness: -547.2055254740338[K
[36/1000] max fitness: -547.2055254740338[K
[37/1000] max fitness: -547.2055254740338[K
[38/1000] max fitness: -547.2055254740338[K
[39/1000] max fitness: -547.2055254740338[K
[40/1000] max fitness: -547.2055254740338[K
[41/1000] max fitness: -547.2055254740338[K
[42/1000] max fitness: -547.2055254740338[K
[43/1000] max fitness: -547.2055254740338[K
[44/1000] max fitness: -547.2055254740338[K
[45/1000] max fitness: -547.2055254740338[K
[46/1000] max fitness: -547.2055254740338[K
[47/1000] max fitness: -547.2055254740338[K
[48/1000] max fitness: -547.2055254740338[K
[49/1000] max fitness: -547.2055254740338[K
[50/1000] max fitness: -547.2055254740338[K
[51/1000] max fitness: -547.2055254740338[K
[52/1000] max fitness: -547.2055254740338[K
[53/1000] max fitness: -547.2055254740338[K
[54/1000] max fitness: -547.2055254740338[K
[55/1000] max fitness: -547.2055254740338[K
[56/1000] max fitness: -547.2055254740338[K
[57/1000] max fitness: -547.2055254740338[K
[58/1000] max fitness: -547.2055254740338[K
[59/1000] max fitness: -547.2055254740338[K
[60/1000] max fitness: -547.2055254740338[K
[61/1000] max fitness: -547.2055254740338[K
[62/1000] max fitness: -547.2055254740338[K
[63/1000] max fitness: -547.2055254740338[K
[64/1000] max fitness: -547.2055254740338[K
[65/1000] max fitness: -547.2055254740338[K
[66/1000] max fitness: -547.2055254740338[K
[67/1000] max fitness: -547.2055254740338[K
[68/1000] max fitness: -547.2055254740338[K
[69/1000] max fitness: -547.2055254740338[K
[70/1000] max fitness: -547.2055254740338[K
[71/1000] max fitness: -547.2055254740338[K
[72/1000] max fitness: -547.2055254740338[K
[73/1000] max fitness: -547.2055254740338[K
[74/1000] max fitness: -547.2055254740338[K
[75/1000] max fitness: -547.2055254740338[K
[76/1000] max fitness: -547.2055254740338[K
[77/1000] max fitness: -547.2055254740338[K
[78/1000] max fitness: -547.2055254740338[K
[79/1000] max fitness: -547.2055254740338[K
[80/1000] max fitness: -547.2055254740338[K
[81/1000] max fitness: -547.2055254740338[K
[82/1000] max fitness: -547.2055254740338[K
[83/1000] max fitness: -547.2055254740338[K
[84/1000] max fitness: -547.2055254740338[K
[85/1000] max fitness: -547.2055254740338[K
[86/1000] max fitness: -547.2055254740338[K
[87/1000] max fitness: -547.2055254740338[K
[88/1000] max fitness: -547.2055254740338[K
[89/1000] max fitness: -547.2055254740338[K
[90/1000] max fitness: -547.2055254740338[K
[91/1000] max fitness: -547.2055254740338[K
[92/1000] max fitness: -547.2055254740338[K
[93/1000] max fitness: -547.2055254740338[K
[94/1000] max fitness: -547.2055254740338[K
[95/1000] max fitness: -547.2055254740338[K
[96/1000] max fitness: -547.2055254740338[K
[97/1000] max fitness: -547.2055254740338[K
[98/1000] max fitness: -547.2055254740338[K
[99/1000] max fitness: -547.2055254740338[K
[100/1000] max fitness: -547.2055254740338[K
[101/1000] max fitness: -547.2055254740338[K
[102/1000] max fitness: -547.2055254740338[K
[103/1000] max fitness: -547.2055254740338[K
[104/1000] max fitness: -547.2055254740338[K
[105/1000] max fitness: -547.2055254740338[K
[106/1000] max fitness: -547.2055254740338[K
[107/1000] max fitness: -547.2055254740338[K
[108/1000] max fitness: -547.2055254740338[K
[109/1000] max fitness: -547.2055254740338[K
[110/1000] max fitness: -547.2055254740338[K
[111/1000] max fitness: -547.2055254740338[K
[112/1000] max fitness: -547.2055254740338[K
[113/1000] max fitness: -547.2055254740338[K
[114/1000] max fitness: -547.2055254740338[K
[115/1000] max fitness: -547.2055254740338[K
[116/1000] max fitness: -547.2055254740338[K
[117/1000] max fitness: -547.2055254740338[K
[118/1000] max fitness: -547.2055254740338[K
[119/1000] max fitness: -547.2055254740338[K
[120/1000] max fitness: -547.2055254740338[K
[121/1000] max fitness: -547.2055254740338[K
[122/1000] max fitness: -547.2055254740338[K
[123/1000] max fitness: -547.2055254740338[K
[124/1000] max fitness: -547.2055254740338[K
[125/1000] max fitness: -547.2055254740338[K
[126/1000] max fitness: -547.2055254740338[K
[127/1000] max fitness: -547.2055254740338[K
[128/1000] max fitness: -547.2055254740338[K
[129/1000] max fitness: -547.2055254740338[K
[130/1000] max fitness: -547.2055254740338[K
[131/1000] max fitness: -547.2055254740338[K
[132/1000] max fitness: -547.2055254740338[K
[133/1000] max fitness: -547.2055254740338[K
[134/1000] max fitness: -547.2055254740338[K
[135/1000] max fitness: -547.2055254740338[K
[136/1000] max fitness: -547.2055254740338[K
[137/1000] max fitness: -547.2055254740338[K
[138/1000] max fitness: -547.2055254740338[K
[139/1000] max fitness: -547.2055254740338[K
[140/1000] max fitness: -547.2055254740338[K
[141/1000] max fitness: -547.2055254740338[K
[142/1000] max fitness: -547.2055254740338[K
[143/1000] max fitness: -547.2055254740338[K
[144/1000] max fitness: -547.2055254740338[K
[145/1000] max fitness: -547.2055254740338[K
[146/1000] max fitness: -547.2055254740338[K
[147/1000] max fitness: -547.2055254740338[K
[148/1000] max fitness: -547.2055254740338[K
[149/1000] max fitness: -547.2055254740338[K
[150/1000] max fitness: -547.2055254740338[K
[151/1000] max fitness: -547.2055254740338[K
[152/1000] max fitness: -547.2055254740338[K
[153/1000] max fitness: -547.2055254740338[K
[154/1000] max fitness: -547.2055254740338[K
[155/1000] max fitness: -547.2055254740338[K
[156/1000] max fitness: -547.2055254740338[K
[157/1000] max fitness: -547.2055254740338[K
[158/1000] max fitness: -547.2055254740338[K
[159/1000] max fitness: -547.2055254740338[K
[160/1000] max fitness: -547.2055254740338[K
[161/1000] max fitness: -547.2055254740338[K
[162/1000] max fitness: -547.2055254740338[K
[163/1000] max fitness: -547.2055254740338[K
[164/1000] max fitness: -547.2055254740338[K
[165/1000] max fitness: -547.2055254740338[K
[166/1000] max fitness: -547.2055254740338[K
[167/1000] max fitness: -547.2055254740338[K
[168/1000] max fitness: -547.2055254740338[K
[169/1000] max fitness: -547.2055254740338[K
[170/1000] max fitness: -547.2055254740338[K
[171/1000] max fitness: -547.2055254740338[K
[172/1000] max fitness: -547.2055254740338[K
[173/1000] max fitness: -547.2055254740338[K
[174/1000] max fitness: -547.2055254740338[K
[175/1000] max fitness: -547.2055254740338[K
[176/1000] max fitness: -547.2055254740338[K
[177/1000] max fitness: -547.2055254740338[K
[178/1000] max fitness: -547.2055254740338[K
[179/1000] max fitness: -547.2055254740338[K
[180/1000] max fitness: -547.2055254740338[K
[181/1000] max fitness: -547.2055254740338[K
[182/1000] max fitness: -547.2055254740338[K
[183/1000] max fitness: -547.2055254740338[K
[184/1000] max fitness: -547.2055254740338[K
[185/1000] max fitness: -547.2055254740338[K
[186/1000] max fitness: -547.2055254740338[K
[187/1000] max fitness: -547.2055254740338[K
[188/1000] max fitness: -547.2055254740338[K
[189/1000] max fitness: -547.2055254740338[K
[190/1000] max fitness: -547.2055254740338[K
[191/1000] max fitness: -547.2055254740338[K
[192/1000] max fitness: -547.2055254740338[K
[193/1000] max fitness: -547.2055254740338[K
[194/1000] max fitness: -547.2055254740338[K
[195/1000] max fitness: -547.2055254740338[K
[196/1000] max fitness: -547.2055254740338[K
[197/1000] max fitness: -547.2055254740338[K
[198/1000] max fitness: -547.2055254740338[K
[199/1000] max fitness: -547.2055254740338[K
[200/1000] max fitness: -547.2055254740338[K
[201/1000] max fitness: -547.2055254740338[K
[202/1000] max fitness: -547.2055254740338[K
[203/1000] max fitness: -547.2055254740338[K
[204/1000] max fitness: -547.2055254740338[K
[205/1000] max fitness: -547.2055254740338[K
[206/1000] max fitness: -547.2055254740338[K
[207/1000] max fitness: -547.2055254740338[K
[208/1000] max fitness: -547.2055254740338[K
[209/1000] max fitness: -547.2055254740338[K
[210/1000] max fitness: -547.2055254740338[K
[211/1000] max fitness: -547.2055254740338[K
[212/1000] max fitness: -547.2055254740338[K
[213/1000] max fitness: -547.2055254740338[K
[214/1000] max fitness: -547.2055254740338[K
[215/1000] max fitness: -547.2055254740338[K
[216/1000] max fitness: -547.2055254740338[K
[217/1000] max fitness: -547.2055254740338[K
[218/1000] max fitness: -547.2055254740338[K
[219/1000] max fitness: -547.2055254740338[K
[220/1000] max fitness: -547.2055254740338[K
[221/1000] max fitness: -547.2055254740338[K
[222/1000] max fitness: -547.2055254740338[K
[223/1000] max fitness: -547.2055254740338[K
[224/1000] max fitness: -547.2055254740338[K
[225/1000] max fitness: -547.2055254740338[K
[226/1000] max fitness: -547.2055254740338[K
[227/1000] max fitness: -547.2055254740338[K
[228/1000] max fitness: -547.2055254740338[K
[229/1000] max fitness: -547.2055254740338[K
[230/1000] max fitness: -547.2055254740338[K
[231/1000] max fitness: -547.2055254740338[K
[232/1000] max fitness: -547.2055254740338[K
[233/1000] max fitness: -547.2055254740338[K
[234/1000] max fitness: -547.2055254740338[K
[235/1000] max fitness: -547.2055254740338[K
[236/1000] max fitness: -547.2055254740338[K
[237/1000] max fitness: -547.2055254740338[K
[238/1000] max fitness: -547.2055254740338[K
[239/1000] max fitness: -547.2055254740338[K
[240/1000] max fitness: -547.2055254740338[K
[241/1000] max fitness: -547.2055254740338[K
[242/1000] max fitness: -547.2055254740338[K
[243/1000] max fitness: -547.2055254740338[K
[244/1000] max fitness: -547.2055254740338[K
[245/1000] max fitness: -547.2055254740338[K
[246/1000] max fitness: -547.2055254740338[K
[247/1000] max fitness: -547.2055254740338[K
[248/1000] max fitness: -547.2055254740338[K
[249/1000] max fitness: -547.2055254740338[K
[250/1000] max fitness: -547.2055254740338[K
[251/1000] max fitness: -547.2055254740338[K
[252/1000] max fitness: -547.2055254740338[K
[253/1000] max fitness: -547.2055254740338[K
[254/1000] max fitness: -547.2055254740338[K
[255/1000] max fitness: -547.2055254740338[K
[256/1000] max fitness: -547.2055254740338[K
[257/1000] max fitness: -547.2055254740338[K
[258/1000] max fitness: -547.2055254740338[K
[259/1000] max fitness: -547.2055254740338[K
[260/1000] max fitness: -547.2055254740338[K
[261/1000] max fitness: -547.2055254740338[K
[262/1000] max fitness: -547.2055254740338[K
[263/1000] max fitness: -547.2055254740338[K
[264/1000] max fitness: -547.2055254740338[K
[265/1000] max fitness: -547.2055254740338[K
[266/1000] max fitness: -547.2055254740338[K
[267/1000] max fitness: -547.2055254740338[K
[268/1000] max fitness: -547.2055254740338[K
[269/1000] max fitness: -547.2055254740338[K
[270/1000] max fitness: -547.2055254740338[K
[271/1000] max fitness: -547.2055254740338[K
[272/1000] max fitness: -547.2055254740338[K
[273/1000] max fitness: -547.2055254740338[K
[274/1000] max fitness: -547.2055254740338[K
[275/1000] max fitness: -547.2055254740338[K
[276/1000] max fitness: -547.2055254740338[K
[277/1000] max fitness: -547.2055254740338[K
[278/1000] max fitness: -547.2055254740338[K
[279/1000] max fitness: -547.2055254740338[K
[280/1000] max fitness: -547.2055254740338[K
[281/1000] max fitness: -547.2055254740338[K
[282/1000] max fitness: -547.2055254740338[K
[283/1000] max fitness: -547.2055254740338[K
[284/1000] max fitness: -547.2055254740338[K
[285/1000] max fitness: -547.2055254740338[K
[286/1000] max fitness: -547.2055254740338[K
[287/1000] max fitness: -547.2055254740338[K
[288/1000] max fitness: -547.2055254740338[K
[289/1000] max fitness: -547.2055254740338[K
[290/1000] max fitness: -547.2055254740338[K
[291/1000] max fitness: -547.2055254740338[K
[292/1000] max fitness: -547.2055254740338[K
[293/1000] max fitness: -547.2055254740338[K
[294/1000] max fitness: -547.2055254740338[K
[295/1000] max fitness: -547.2055254740338[K
[296/1000] max fitness: -547.2055254740338[K
[297/1000] max fitness: -547.2055254740338[K
[298/1000] max fitness: -547.2055254740338[K
[299/1000] max fitness: -547.2055254740338[K
[300/1000] max fitness: -547.2055254740338[K
[301/1000] max fitness: -547.2055254740338[K
[302/1000] max fitness: -547.2055254740338[K
[303/1000] max fitness: -547.2055254740338[K
[304/1000] max fitness: -547.2055254740338[K
[305/1000] max fitness: -547.2055254740338[K
[306/1000] max fitness: -547.2055254740338[K
[307/1000] max fitness: -547.2055254740338[K
[308/1000] max fitness: -547.2055254740338[K
[309/1000] max fitness: -547.2055254740338[K
[310/1000] max fitness: -547.2055254740338[K
[311/1000] max fitness: -547.2055254740338[K
[312/1000] max fitness: -547.2055254740338[K
[313/1000] max fitness: -547.2055254740338[K
[314/1000] max fitness: -547.2055254740338[K
[315/1000] max fitness: -547.2055254740338[K
[316/1000] max fitness: -547.2055254740338[K
[317/1000] max fitness: -547.2055254740338[K
[318/1000] max fitness: -547.2055254740338[K
[319/1000] max fitness: -547.2055254740338[K
[320/1000] max fitness: -547.2055254740338[K
[321/1000] max fitness: -547.2055254740338[K
[322/1000] max fitness: -547.2055254740338[K
[323/1000] max fitness: -547.2055254740338[K
[324/1000] max fitness: -547.2055254740338[K
[325/1000] max fitness: -547.2055254740338[K
[326/1000] max fitness: -547.2055254740338[K
[327/1000] max fitness: -547.2055254740338[K
[328/1000] max fitness: -547.2055254740338[K
[329/1000] max fitness: -547.2055254740338[K
[330/1000] max fitness: -547.2055254740338[K
[331/1000] max fitness: -547.2055254740338[K
[332/1000] max fitness: -547.2055254740338[K
[333/1000] max fitness: -547.2055254740338[K
[334/1000] max fitness: -547.2055254740338[K
[335/1000] max fitness: -547.2055254740338[K
[336/1000] max fitness: -547.2055254740338[K
[337/1000] max fitness: -547.2055254740338[K
[338/1000] max fitness: -547.2055254740338[K
[339/1000] max fitness: -547.2055254740338[K
[340/1000] max fitness: -547.2055254740338[K
[341/1000] max fitness: -547.2055254740338[K
[342/1000] max fitness: -547.2055254740338[K
[343/1000] max fitness: -547.2055254740338[K
[344/1000] max fitness: -547.2055254740338[K
[345/1000] max fitness: -547.2055254740338[K
[346/1000] max fitness: -547.2055254740338[K
[347/1000] max fitness: -547.2055254740338[K
[348/1000] max fitness: -547.2055254740338[K
[349/1000] max fitness: -547.2055254740338[K
[350/1000] max fitness: -547.2055254740338[K
[351/1000] max fitness: -547.2055254740338[K
[352/1000] max fitness: -547.2055254740338[K
[353/1000] max fitness: -547.2055254740338[K
[354/1000] max fitness: -547.2055254740338[K
[355/1000] max fitness: -547.2055254740338[K
[356/1000] max fitness: -547.2055254740338[K
[357/1000] max fitness: -547.2055254740338[K
[358/1000] max fitness: -547.2055254740338[K
[359/1000] max fitness: -547.2055254740338[K
[360/1000] max fitness: -547.2055254740338[K
[361/1000] max fitness: -547.2055254740338[K
[362/1000] max fitness: -547.2055254740338[K
[363/1000] max fitness: -547.2055254740338[K
[364/1000] max fitness: -547.2055254740338[K
[365/1000] max fitness: -547.2055254740338[K
[366/1000] max fitness: -547.2055254740338[K
[367/1000] max fitness: -547.2055254740338[K
[368/1000] max fitness: -547.2055254740338[K
[369/1000] max fitness: -547.2055254740338[K
[370/1000] max fitness: -547.2055254740338[K
[371/1000] max fitness: -547.2055254740338[K
[372/1000] max fitness: -547.2055254740338[K
[373/1000] max fitness: -547.2055254740338[K
[374/1000] max fitness: -547.2055254740338[K
[375/1000] max fitness: -547.2055254740338[K
[376/1000] max fitness: -547.2055254740338[K
[377/1000] max fitness: -547.2055254740338[K
[378/1000] max fitness: -547.2055254740338[K
[379/1000] max fitness: -547.2055254740338[K
[380/1000] max fitness: -547.2055254740338[K
[381/1000] max fitness: -547.2055254740338[K
[382/1000] max fitness: -547.2055254740338[K
[383/1000] max fitness: -204.3797094667438[K
[384/1000] max fitness: -204.3797094667438[K
[385/1000] max fitness: -204.3797094667438[K
[386/1000] max fitness: -204.3797094667438[K
[387/1000] max fitness: -6.780423933834549[K
[388/1000] max fitness: -6.780423933834549[K
[389/1000] max fitness: -6.780423933834549[K
[390/1000] max fitness: -6.780423933834549[K
[391/1000] max fitness: -6.780423933834549[K
[392/1000] max fitness: -6.543596105268037[K
[393/1000] max fitness: -6.543596105268037[K
[394/1000] max fitness: -6.543596105268037[K
[395/1000] max fitness: -6.543596105268037[K
[396/1000] max fitness: -6.543596105268037[K
[397/1000] max fitness: -6.543596105268037[K
[398/1000] max fitness: -6.543596105268037[K
[399/1000] max fitness: -6.543596105268037[K
[400/1000] max fitness: -6.543596105268037[K
[401/1000] max fitness: -1.0[K
[402/1000] max fitness: -1.0[K
[403/1000] max fitness: -1.0[K
[404/1000] max fitness: -1.0[K
[405/1000] max fitness: -1.0[K
[406/1000] max fitness: -1.0[K
[407/1000] max fitness: -1.0[K
[408/1000] max fitness: -1.0[K
[409/1000] max fitness: -1.0[K
[410/1000] max fitness: -1.0[K
[411/1000] max fitness: -1.0[K
[412/1000] max fitness: -1.0[K
[413/1000] max fitness: -1.0[K
[414/1000] max fitness: -1.0[K
[415/1000] max fitness: -1.0[K
[416/1000] max fitness: -1.0[K
[417/1000] max fitness: -1.0[K
[418/1000] max fitness: -1.0[K
[419/1000] max fitness: -1.0[K
[420/1000] max fitness: -1.0[K
[421/1000] max fitness: -1.0[K
[422/1000] max fitness: 0.0[K
Total running time of the script: ( 0 minutes 36.529 seconds)