Note
Click here to download the full example code
Example for evolutionary regression¶
Example demonstrating the use of Cartesian genetic programming for two regression tasks.
# The docopt str is added explicitly to ensure compatibility with
# sphinx-gallery.
docopt_str = """
Usage:
example_evo_regression.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_graph = individual.to_func()
y = np.empty(n_function_evaluations)
x = np.random.uniform(-4, 4, size=(n_function_evaluations, 2))
for i, x_i in enumerate(x):
with warnings.catch_warnings(): # ignore warnings due to zero division
warnings.filterwarnings(
"ignore", message="divide by zero encountered in double_scalars"
)
warnings.filterwarnings(
"ignore", message="invalid value encountered in double_scalars"
)
try:
y[i] = f_graph(x_i[0], x_i[1])
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": 818821}
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(pop, obj, 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.pdf")
Out:
[2/1000] max fitness: -269.9919395803643[K
[3/1000] max fitness: -269.9919395803643[K
[4/1000] max fitness: -269.9919395803643[K
[5/1000] max fitness: -269.9919395803643[K
[6/1000] max fitness: -269.9919395803643[K
[7/1000] max fitness: -263.531183672255[K
[8/1000] max fitness: -263.531183672255[K
[9/1000] max fitness: -263.531183672255[K
[10/1000] max fitness: -251.52289510576531[K
[11/1000] max fitness: -181.76692589107245[K
[12/1000] max fitness: -181.76692589107245[K
[13/1000] max fitness: -55.09260003381215[K
[14/1000] max fitness: -55.09260003381215[K
[15/1000] max fitness: -55.09260003381215[K
[16/1000] max fitness: -55.09260003381215[K
[17/1000] max fitness: -55.09260003381215[K
[18/1000] max fitness: -10.734522237299498[K
[19/1000] max fitness: -10.734522237299498[K
[20/1000] max fitness: -10.734522237299498[K
[21/1000] max fitness: -10.734522237299498[K
[22/1000] max fitness: -10.734522237299498[K
[23/1000] max fitness: -10.734522237299498[K
[24/1000] max fitness: -0.9999999999999998[K
[25/1000] max fitness: -0.9999999999999998[K
[26/1000] max fitness: -0.9999999999999998[K
[27/1000] max fitness: -0.9999999999999998[K
[28/1000] max fitness: -4.34591243726438e-30[K
[2/1000] max fitness: -25413.685133370906[K
[3/1000] max fitness: -25413.685133370906[K
[4/1000] max fitness: -25411.256198202307[K
[5/1000] max fitness: -25402.213805007177[K
[6/1000] max fitness: -13839.638415376236[K
[7/1000] max fitness: -13839.638415376236[K
[8/1000] max fitness: -13839.638415376236[K
[9/1000] max fitness: -13839.638415376236[K
[10/1000] max fitness: -13839.638415376236[K
[11/1000] max fitness: -5755.344202651551[K
[12/1000] max fitness: -5755.344202651551[K
[13/1000] max fitness: -5755.344202651551[K
[14/1000] max fitness: -5755.344202651551[K
[15/1000] max fitness: -5755.344202651551[K
[16/1000] max fitness: -5755.344202651551[K
[17/1000] max fitness: -5755.344202651551[K
[18/1000] max fitness: -5755.344202651551[K
[19/1000] max fitness: -5755.344202651551[K
[20/1000] max fitness: -5755.344202651551[K
[21/1000] max fitness: -5755.344202651551[K
[22/1000] max fitness: -5755.344202651551[K
[23/1000] max fitness: -5755.344202651551[K
[24/1000] max fitness: -5755.344202651551[K
[25/1000] max fitness: -5755.344202651551[K
[26/1000] max fitness: -5755.344202651551[K
[27/1000] max fitness: -5755.344202651551[K
[28/1000] max fitness: -5755.344202651551[K
[29/1000] max fitness: -5755.344202651551[K
[30/1000] max fitness: -5755.344202651551[K
[31/1000] max fitness: -5755.344202651551[K
[32/1000] max fitness: -5755.344202651551[K
[33/1000] max fitness: -5755.344202651551[K
[34/1000] max fitness: -5755.344202651551[K
[35/1000] max fitness: -5755.344202651551[K
[36/1000] max fitness: -5755.344202651551[K
[37/1000] max fitness: -5755.344202651551[K
[38/1000] max fitness: -5755.344202651551[K
[39/1000] max fitness: -5755.344202651551[K
[40/1000] max fitness: -5755.344202651551[K
[41/1000] max fitness: -5755.344202651551[K
[42/1000] max fitness: -5755.344202651551[K
[43/1000] max fitness: -5755.344202651551[K
[44/1000] max fitness: -5755.344202651551[K
[45/1000] max fitness: -5755.344202651551[K
[46/1000] max fitness: -5755.344202651551[K
[47/1000] max fitness: -5755.344202651551[K
[48/1000] max fitness: -5755.344202651551[K
[49/1000] max fitness: -5755.344202651551[K
[50/1000] max fitness: -5755.344202651551[K
[51/1000] max fitness: -5755.344202651551[K
[52/1000] max fitness: -5755.344202651551[K
[53/1000] max fitness: -5755.344202651551[K
[54/1000] max fitness: -5755.344202651551[K
[55/1000] max fitness: -5755.344202651551[K
[56/1000] max fitness: -5755.344202651551[K
[57/1000] max fitness: -5755.344202651551[K
[58/1000] max fitness: -5755.344202651551[K
[59/1000] max fitness: -5755.344202651551[K
[60/1000] max fitness: -5755.344202651551[K
[61/1000] max fitness: -5755.344202651551[K
[62/1000] max fitness: -5755.344202651551[K
[63/1000] max fitness: -5755.344202651551[K
[64/1000] max fitness: -5755.344202651551[K
[65/1000] max fitness: -5755.344202651551[K
[66/1000] max fitness: -5755.344202651551[K
[67/1000] max fitness: -5755.344202651551[K
[68/1000] max fitness: -5755.344202651551[K
[69/1000] max fitness: -5755.344202651551[K
[70/1000] max fitness: -5755.344202651551[K
[71/1000] max fitness: -5755.344202651551[K
[72/1000] max fitness: -5755.344202651551[K
[73/1000] max fitness: -5755.344202651551[K
[74/1000] max fitness: -5755.344202651551[K
[75/1000] max fitness: -5755.344202651551[K
[76/1000] max fitness: -5755.344202651551[K
[77/1000] max fitness: -5755.344202651551[K
[78/1000] max fitness: -5755.344202651551[K
[79/1000] max fitness: -5755.344202651551[K
[80/1000] max fitness: -5755.344202651551[K
[81/1000] max fitness: -5755.344202651551[K
[82/1000] max fitness: -5755.344202651551[K
[83/1000] max fitness: -5755.344202651551[K
[84/1000] max fitness: -5755.344202651551[K
[85/1000] max fitness: -5755.344202651551[K
[86/1000] max fitness: -5755.344202651551[K
[87/1000] max fitness: -5755.344202651551[K
[88/1000] max fitness: -5755.344202651551[K
[89/1000] max fitness: -5755.344202651551[K
[90/1000] max fitness: -5755.344202651551[K
[91/1000] max fitness: -5755.344202651551[K
[92/1000] max fitness: -5755.344202651551[K
[93/1000] max fitness: -5755.344202651551[K
[94/1000] max fitness: -5755.344202651551[K
[95/1000] max fitness: -5755.344202651551[K
[96/1000] max fitness: -5755.344202651551[K
[97/1000] max fitness: -5755.344202651551[K
[98/1000] max fitness: -5755.344202651551[K
[99/1000] max fitness: -5755.344202651551[K
[100/1000] max fitness: -5755.344202651551[K
[101/1000] max fitness: -5755.344202651551[K
[102/1000] max fitness: -5755.344202651551[K
[103/1000] max fitness: -5755.344202651551[K
[104/1000] max fitness: -5755.344202651551[K
[105/1000] max fitness: -5755.344202651551[K
[106/1000] max fitness: -5755.344202651551[K
[107/1000] max fitness: -5755.344202651551[K
[108/1000] max fitness: -5755.344202651551[K
[109/1000] max fitness: -5755.344202651551[K
[110/1000] max fitness: -5755.344202651551[K
[111/1000] max fitness: -5755.344202651551[K
[112/1000] max fitness: -5755.344202651551[K
[113/1000] max fitness: -5755.344202651551[K
[114/1000] max fitness: -5755.344202651551[K
[115/1000] max fitness: -5755.344202651551[K
[116/1000] max fitness: -5755.344202651551[K
[117/1000] max fitness: -5755.344202651551[K
[118/1000] max fitness: -5755.344202651551[K
[119/1000] max fitness: -5755.344202651551[K
[120/1000] max fitness: -5755.344202651551[K
[121/1000] max fitness: -5755.344202651551[K
[122/1000] max fitness: -5755.344202651551[K
[123/1000] max fitness: -5755.344202651551[K
[124/1000] max fitness: -5755.344202651551[K
[125/1000] max fitness: -5755.344202651551[K
[126/1000] max fitness: -5755.344202651551[K
[127/1000] max fitness: -5755.344202651551[K
[128/1000] max fitness: -5755.344202651551[K
[129/1000] max fitness: -5755.344202651551[K
[130/1000] max fitness: -5755.344202651551[K
[131/1000] max fitness: -5755.344202651551[K
[132/1000] max fitness: -5755.344202651551[K
[133/1000] max fitness: -5755.344202651551[K
[134/1000] max fitness: -5755.344202651551[K
[135/1000] max fitness: -5755.344202651551[K
[136/1000] max fitness: -5755.344202651551[K
[137/1000] max fitness: -5755.344202651551[K
[138/1000] max fitness: -5755.344202651551[K
[139/1000] max fitness: -5755.344202651551[K
[140/1000] max fitness: -5755.344202651551[K
[141/1000] max fitness: -5755.344202651551[K
[142/1000] max fitness: -5755.344202651551[K
[143/1000] max fitness: -5755.344202651551[K
[144/1000] max fitness: -5755.344202651551[K
[145/1000] max fitness: -5755.344202651551[K
[146/1000] max fitness: -5755.344202651551[K
[147/1000] max fitness: -5755.344202651551[K
[148/1000] max fitness: -5755.344202651551[K
[149/1000] max fitness: -5755.344202651551[K
[150/1000] max fitness: -5755.344202651551[K
[151/1000] max fitness: -5755.344202651551[K
[152/1000] max fitness: -5755.344202651551[K
[153/1000] max fitness: -5755.344202651551[K
[154/1000] max fitness: -5755.344202651551[K
[155/1000] max fitness: -5755.344202651551[K
[156/1000] max fitness: -5755.344202651551[K
[157/1000] max fitness: -5755.344202651551[K
[158/1000] max fitness: -5755.344202651551[K
[159/1000] max fitness: -5755.344202651551[K
[160/1000] max fitness: -5755.344202651551[K
[161/1000] max fitness: -5755.344202651551[K
[162/1000] max fitness: -5755.344202651551[K
[163/1000] max fitness: -5755.344202651551[K
[164/1000] max fitness: -5755.344202651551[K
[165/1000] max fitness: -5755.344202651551[K
[166/1000] max fitness: -5755.344202651551[K
[167/1000] max fitness: -5755.344202651551[K
[168/1000] max fitness: -5755.344202651551[K
[169/1000] max fitness: -5755.344202651551[K
[170/1000] max fitness: -5755.344202651551[K
[171/1000] max fitness: -5755.344202651551[K
[172/1000] max fitness: -5755.344202651551[K
[173/1000] max fitness: -5755.344202651551[K
[174/1000] max fitness: -5755.344202651551[K
[175/1000] max fitness: -5755.344202651551[K
[176/1000] max fitness: -5755.344202651551[K
[177/1000] max fitness: -5755.344202651551[K
[178/1000] max fitness: -5755.344202651551[K
[179/1000] max fitness: -5755.344202651551[K
[180/1000] max fitness: -5755.344202651551[K
[181/1000] max fitness: -5755.344202651551[K
[182/1000] max fitness: -5755.344202651551[K
[183/1000] max fitness: -5755.344202651551[K
[184/1000] max fitness: -5755.344202651551[K
[185/1000] max fitness: -5755.344202651551[K
[186/1000] max fitness: -5755.344202651551[K
[187/1000] max fitness: -5755.344202651551[K
[188/1000] max fitness: -5755.344202651551[K
[189/1000] max fitness: -5755.344202651551[K
[190/1000] max fitness: -5755.344202651551[K
[191/1000] max fitness: -5755.344202651551[K
[192/1000] max fitness: -5755.344202651551[K
[193/1000] max fitness: -5755.344202651551[K
[194/1000] max fitness: -5755.344202651551[K
[195/1000] max fitness: -5755.344202651551[K
[196/1000] max fitness: -5755.344202651551[K
[197/1000] max fitness: -5755.344202651551[K
[198/1000] max fitness: -5755.344202651551[K
[199/1000] max fitness: -5755.344202651551[K
[200/1000] max fitness: -5755.344202651551[K
[201/1000] max fitness: -5755.344202651551[K
[202/1000] max fitness: -5755.344202651551[K
[203/1000] max fitness: -5755.344202651551[K
[204/1000] max fitness: -5755.344202651551[K
[205/1000] max fitness: -5755.344202651551[K
[206/1000] max fitness: -5755.344202651551[K
[207/1000] max fitness: -5755.344202651551[K
[208/1000] max fitness: -5755.344202651551[K
[209/1000] max fitness: -5755.344202651551[K
[210/1000] max fitness: -5755.344202651551[K
[211/1000] max fitness: -5755.344202651551[K
[212/1000] max fitness: -5755.344202651551[K
[213/1000] max fitness: -5755.344202651551[K
[214/1000] max fitness: -5755.344202651551[K
[215/1000] max fitness: -5755.344202651551[K
[216/1000] max fitness: -5755.344202651551[K
[217/1000] max fitness: -5755.344202651551[K
[218/1000] max fitness: -5755.344202651551[K
[219/1000] max fitness: -5755.344202651551[K
[220/1000] max fitness: -5755.344202651551[K
[221/1000] max fitness: -5755.344202651551[K
[222/1000] max fitness: -5755.344202651551[K
[223/1000] max fitness: -5755.344202651551[K
[224/1000] max fitness: -5755.344202651551[K
[225/1000] max fitness: -5755.344202651551[K
[226/1000] max fitness: -5755.344202651551[K
[227/1000] max fitness: -5755.344202651551[K
[228/1000] max fitness: -5755.344202651551[K
[229/1000] max fitness: -5755.344202651551[K
[230/1000] max fitness: -5755.344202651551[K
[231/1000] max fitness: -5755.344202651551[K
[232/1000] max fitness: -5755.344202651551[K
[233/1000] max fitness: -5755.344202651551[K
[234/1000] max fitness: -5755.344202651551[K
[235/1000] max fitness: -5755.344202651551[K
[236/1000] max fitness: -5755.344202651551[K
[237/1000] max fitness: -5755.344202651551[K
[238/1000] max fitness: -5755.344202651551[K
[239/1000] max fitness: -5755.344202651551[K
[240/1000] max fitness: -5755.344202651551[K
[241/1000] max fitness: -5755.344202651551[K
[242/1000] max fitness: -5755.344202651551[K
[243/1000] max fitness: -5755.344202651551[K
[244/1000] max fitness: -5755.344202651551[K
[245/1000] max fitness: -5755.344202651551[K
[246/1000] max fitness: -5755.344202651551[K
[247/1000] max fitness: -5755.344202651551[K
[248/1000] max fitness: -5755.344202651551[K
[249/1000] max fitness: -5755.344202651551[K
[250/1000] max fitness: -5755.344202651551[K
[251/1000] max fitness: -5755.344202651551[K
[252/1000] max fitness: -5755.344202651551[K
[253/1000] max fitness: -5755.344202651551[K
[254/1000] max fitness: -3448.2535886942387[K
[255/1000] max fitness: -3448.2535886942387[K
[256/1000] max fitness: -3448.2535886942387[K
[257/1000] max fitness: -3448.2535886942387[K
[258/1000] max fitness: -3448.2535886942387[K
[259/1000] max fitness: -3448.2535886942387[K
[260/1000] max fitness: -1.0000000000000018[K
[261/1000] max fitness: -1.0000000000000018[K
[262/1000] max fitness: -1.0000000000000018[K
[263/1000] max fitness: -1.0000000000000018[K
[264/1000] max fitness: -1.0000000000000018[K
[265/1000] max fitness: -1.0000000000000018[K
[266/1000] max fitness: -1.0000000000000018[K
[267/1000] max fitness: -1.0000000000000018[K
[268/1000] max fitness: -1.0000000000000018[K
[269/1000] max fitness: -1.0000000000000018[K
[270/1000] max fitness: -1.0000000000000018[K
[271/1000] max fitness: -1.0000000000000018[K
[272/1000] max fitness: -1.0000000000000018[K
[273/1000] max fitness: -1.0000000000000018[K
[274/1000] max fitness: -1.0000000000000018[K
[275/1000] max fitness: -1.0000000000000018[K
[276/1000] max fitness: -1.0000000000000018[K
[277/1000] max fitness: -1.0000000000000018[K
[278/1000] max fitness: -1.0000000000000018[K
[279/1000] max fitness: -1.0000000000000018[K
[280/1000] max fitness: -1.0000000000000018[K
[281/1000] max fitness: -1.0000000000000018[K
[282/1000] max fitness: -1.0000000000000018[K
[283/1000] max fitness: -1.0000000000000018[K
[284/1000] max fitness: -1.0000000000000018[K
[285/1000] max fitness: -1.0000000000000018[K
[286/1000] max fitness: -1.0000000000000018[K
[287/1000] max fitness: -1.0000000000000018[K
[288/1000] max fitness: -1.0000000000000018[K
[289/1000] max fitness: -1.0000000000000018[K
[290/1000] max fitness: -1.0000000000000018[K
[291/1000] max fitness: -1.0[K
[292/1000] max fitness: -1.0[K
[293/1000] max fitness: -1.0[K
[294/1000] max fitness: -1.0[K
[295/1000] max fitness: -1.0[K
[296/1000] max fitness: -1.0[K
[297/1000] max fitness: -1.0[K
[298/1000] max fitness: -1.0[K
[299/1000] max fitness: -1.0[K
[300/1000] max fitness: -1.0[K
[301/1000] max fitness: -1.0[K
[302/1000] max fitness: -1.0[K
[303/1000] max fitness: -1.0[K
[304/1000] max fitness: -1.0[K
[305/1000] max fitness: -1.0[K
[306/1000] max fitness: -1.0[K
[307/1000] max fitness: -1.0[K
[308/1000] max fitness: -1.0[K
[309/1000] max fitness: -1.0[K
[310/1000] max fitness: -1.0[K
[311/1000] max fitness: -1.0[K
[312/1000] max fitness: -1.0[K
[313/1000] max fitness: -1.0[K
[314/1000] max fitness: -1.0[K
[315/1000] max fitness: -1.0[K
[316/1000] max fitness: -1.0[K
[317/1000] max fitness: -1.0[K
[318/1000] max fitness: -1.0[K
[319/1000] max fitness: -1.0[K
[320/1000] max fitness: -1.0[K
[321/1000] max fitness: -1.0[K
[322/1000] max fitness: -1.0[K
[323/1000] max fitness: -1.0[K
[324/1000] max fitness: -1.0[K
[325/1000] max fitness: -1.0[K
[326/1000] max fitness: -1.0[K
[327/1000] max fitness: -1.0[K
[328/1000] max fitness: -1.0[K
[329/1000] max fitness: -1.0[K
[330/1000] max fitness: -1.0[K
[331/1000] max fitness: -1.0[K
[332/1000] max fitness: -1.0[K
[333/1000] max fitness: -1.0[K
[334/1000] max fitness: -1.0[K
[335/1000] max fitness: -1.0[K
[336/1000] max fitness: -1.0[K
[337/1000] max fitness: -1.0[K
[338/1000] max fitness: -1.0[K
[339/1000] max fitness: -1.0[K
[340/1000] max fitness: -1.0[K
[341/1000] max fitness: -1.0[K
[342/1000] max fitness: -1.0[K
[343/1000] max fitness: -1.0[K
[344/1000] max fitness: -1.0[K
[345/1000] max fitness: -1.0[K
[346/1000] max fitness: -1.0[K
[347/1000] max fitness: -1.0[K
[348/1000] max fitness: -1.0[K
[349/1000] max fitness: -1.0[K
[350/1000] max fitness: -1.0[K
[351/1000] max fitness: -1.0[K
[352/1000] max fitness: -1.0[K
[353/1000] max fitness: -1.0[K
[354/1000] max fitness: -1.0[K
[355/1000] max fitness: -1.0[K
[356/1000] max fitness: -1.0[K
[357/1000] max fitness: -1.0[K
[358/1000] max fitness: -1.0[K
[359/1000] max fitness: -1.0[K
[360/1000] max fitness: -1.0[K
[361/1000] max fitness: -1.0[K
[362/1000] max fitness: -1.0[K
[363/1000] max fitness: -1.0[K
[364/1000] max fitness: -1.0[K
[365/1000] max fitness: -1.0[K
[366/1000] max fitness: -1.0[K
[367/1000] max fitness: -1.0[K
[368/1000] max fitness: -1.0[K
[369/1000] max fitness: -1.0[K
[370/1000] max fitness: -1.0[K
[371/1000] max fitness: -1.0[K
[372/1000] max fitness: -1.0[K
[373/1000] max fitness: -1.0[K
[374/1000] max fitness: -1.0[K
[375/1000] max fitness: -1.0[K
[376/1000] max fitness: -1.0[K
[377/1000] max fitness: -1.0[K
[378/1000] max fitness: -1.0[K
[379/1000] max fitness: -1.0[K
[380/1000] max fitness: -1.0[K
[381/1000] max fitness: -1.0[K
[382/1000] max fitness: -1.0[K
[383/1000] max fitness: -1.0[K
[384/1000] max fitness: -1.0[K
[385/1000] max fitness: -1.0[K
[386/1000] max fitness: -1.0[K
[387/1000] max fitness: -1.0[K
[388/1000] max fitness: -1.0[K
[389/1000] max fitness: -1.0[K
[390/1000] max fitness: -1.0[K
[391/1000] max fitness: -1.0[K
[392/1000] max fitness: -1.0[K
[393/1000] max fitness: -1.0[K
[394/1000] max fitness: -1.0[K
[395/1000] max fitness: -1.0[K
[396/1000] max fitness: -1.0[K
[397/1000] max fitness: -1.0[K
[398/1000] max fitness: -1.0[K
[399/1000] max fitness: -1.0[K
[400/1000] max fitness: -1.0[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: -1.0[K
[423/1000] max fitness: -1.0[K
[424/1000] max fitness: -1.0[K
[425/1000] max fitness: -1.0[K
[426/1000] max fitness: -1.0[K
[427/1000] max fitness: -1.0[K
[428/1000] max fitness: -1.0[K
[429/1000] max fitness: -1.0[K
[430/1000] max fitness: -1.0[K
[431/1000] max fitness: -1.0[K
[432/1000] max fitness: -1.0[K
[433/1000] max fitness: -1.0[K
[434/1000] max fitness: -1.0[K
[435/1000] max fitness: -1.0[K
[436/1000] max fitness: -1.0[K
[437/1000] max fitness: -1.0[K
[438/1000] max fitness: -1.0[K
[439/1000] max fitness: -1.0[K
[440/1000] max fitness: -1.0[K
[441/1000] max fitness: -1.0[K
[442/1000] max fitness: -1.0[K
[443/1000] max fitness: -1.0[K
[444/1000] max fitness: -1.0[K
[445/1000] max fitness: -1.0[K
[446/1000] max fitness: -1.0[K
[447/1000] max fitness: -1.0[K
[448/1000] max fitness: -1.0[K
[449/1000] max fitness: -1.0[K
[450/1000] max fitness: -1.0[K
[451/1000] max fitness: -1.0[K
[452/1000] max fitness: -1.0[K
[453/1000] max fitness: -1.0[K
[454/1000] max fitness: -1.0[K
[455/1000] max fitness: -1.0[K
[456/1000] max fitness: -1.0[K
[457/1000] max fitness: -1.0[K
[458/1000] max fitness: -1.0[K
[459/1000] max fitness: -1.0[K
[460/1000] max fitness: -1.0[K
[461/1000] max fitness: -1.0[K
[462/1000] max fitness: -1.0[K
[463/1000] max fitness: -1.0[K
[464/1000] max fitness: -1.0[K
[465/1000] max fitness: -1.0[K
[466/1000] max fitness: -1.0[K
[467/1000] max fitness: -1.0[K
[468/1000] max fitness: -1.0[K
[469/1000] max fitness: -1.0[K
[470/1000] max fitness: -1.0[K
[471/1000] max fitness: -1.0[K
[472/1000] max fitness: -1.0[K
[473/1000] max fitness: -1.0[K
[474/1000] max fitness: -1.0[K
[475/1000] max fitness: -1.0[K
[476/1000] max fitness: -1.0[K
[477/1000] max fitness: -1.0[K
[478/1000] max fitness: -1.0[K
[479/1000] max fitness: -1.0[K
[480/1000] max fitness: -1.0[K
[481/1000] max fitness: -1.0[K
[482/1000] max fitness: -1.0[K
[483/1000] max fitness: -1.0[K
[484/1000] max fitness: -1.0[K
[485/1000] max fitness: -1.0[K
[486/1000] max fitness: -1.0[K
[487/1000] max fitness: -1.0[K
[488/1000] max fitness: -1.0[K
[489/1000] max fitness: -1.0[K
[490/1000] max fitness: -1.0[K
[491/1000] max fitness: -1.0[K
[492/1000] max fitness: -1.0[K
[493/1000] max fitness: -1.0[K
[494/1000] max fitness: -1.0[K
[495/1000] max fitness: -1.0[K
[496/1000] max fitness: -1.0[K
[497/1000] max fitness: -1.0[K
[498/1000] max fitness: -1.0[K
[499/1000] max fitness: -1.0[K
[500/1000] max fitness: -1.0[K
[501/1000] max fitness: -1.0[K
[502/1000] max fitness: -1.0[K
[503/1000] max fitness: -1.0[K
[504/1000] max fitness: -1.0[K
[505/1000] max fitness: -1.0[K
[506/1000] max fitness: -1.0[K
[507/1000] max fitness: -1.0[K
[508/1000] max fitness: -1.0[K
[509/1000] max fitness: -1.0[K
[510/1000] max fitness: -1.0[K
[511/1000] max fitness: -1.0[K
[512/1000] max fitness: -1.0[K
[513/1000] max fitness: -1.0[K
[514/1000] max fitness: -1.0[K
[515/1000] max fitness: -1.0[K
[516/1000] max fitness: -1.0[K
[517/1000] max fitness: -1.0[K
[518/1000] max fitness: -1.0[K
[519/1000] max fitness: -1.0[K
[520/1000] max fitness: -1.0[K
[521/1000] max fitness: -1.0[K
[522/1000] max fitness: -1.0[K
[523/1000] max fitness: -1.0[K
[524/1000] max fitness: -1.0[K
[525/1000] max fitness: -1.0[K
[526/1000] max fitness: -1.0[K
[527/1000] max fitness: -1.0[K
[528/1000] max fitness: -1.0[K
[529/1000] max fitness: -1.0[K
[530/1000] max fitness: -1.0[K
[531/1000] max fitness: -1.0[K
[532/1000] max fitness: -1.0[K
[533/1000] max fitness: -1.0[K
[534/1000] max fitness: -1.0[K
[535/1000] max fitness: -1.0[K
[536/1000] max fitness: -1.0[K
[537/1000] max fitness: -1.0[K
[538/1000] max fitness: -1.0[K
[539/1000] max fitness: -1.0[K
[540/1000] max fitness: -1.0[K
[541/1000] max fitness: -1.0[K
[542/1000] max fitness: -1.0[K
[543/1000] max fitness: -1.0[K
[544/1000] max fitness: -1.0[K
[545/1000] max fitness: -1.0[K
[546/1000] max fitness: -1.0[K
[547/1000] max fitness: -1.0[K
[548/1000] max fitness: -1.0[K
[549/1000] max fitness: -1.0[K
[550/1000] max fitness: -1.0[K
[551/1000] max fitness: -1.0[K
[552/1000] max fitness: -1.0[K
[553/1000] max fitness: -1.0[K
[554/1000] max fitness: -1.0[K
[555/1000] max fitness: -1.0[K
[556/1000] max fitness: -1.0[K
[557/1000] max fitness: -1.0[K
[558/1000] max fitness: -1.0[K
[559/1000] max fitness: -1.0[K
[560/1000] max fitness: -1.0[K
[561/1000] max fitness: -1.0[K
[562/1000] max fitness: -1.0[K
[563/1000] max fitness: -1.0[K
[564/1000] max fitness: -1.0[K
[565/1000] max fitness: -1.0[K
[566/1000] max fitness: -1.0[K
[567/1000] max fitness: -1.0[K
[568/1000] max fitness: -1.0[K
[569/1000] max fitness: -1.0[K
[570/1000] max fitness: -1.0[K
[571/1000] max fitness: -1.0[K
[572/1000] max fitness: -1.0[K
[573/1000] max fitness: -1.0[K
[574/1000] max fitness: -1.0[K
[575/1000] max fitness: -1.0[K
[576/1000] max fitness: -1.0[K
[577/1000] max fitness: -1.0[K
[578/1000] max fitness: -1.0[K
[579/1000] max fitness: -1.0[K
[580/1000] max fitness: -1.0[K
[581/1000] max fitness: -1.0[K
[582/1000] max fitness: -1.0[K
[583/1000] max fitness: -1.0[K
[584/1000] max fitness: -1.0[K
[585/1000] max fitness: -1.0[K
[586/1000] max fitness: -1.0[K
[587/1000] max fitness: -1.0[K
[588/1000] max fitness: -1.0[K
[589/1000] max fitness: -1.0[K
[590/1000] max fitness: -1.0[K
[591/1000] max fitness: -1.0[K
[592/1000] max fitness: -1.0[K
[593/1000] max fitness: -1.0[K
[594/1000] max fitness: -1.0[K
[595/1000] max fitness: -1.0[K
[596/1000] max fitness: -1.0[K
[597/1000] max fitness: -1.0[K
[598/1000] max fitness: -1.0[K
[599/1000] max fitness: -1.0[K
[600/1000] max fitness: -1.0[K
[601/1000] max fitness: -1.0[K
[602/1000] max fitness: -1.0[K
[603/1000] max fitness: -1.0[K
[604/1000] max fitness: -1.0[K
[605/1000] max fitness: -1.0[K
[606/1000] max fitness: -1.0[K
[607/1000] max fitness: -1.0[K
[608/1000] max fitness: -1.0[K
[609/1000] max fitness: -1.0[K
[610/1000] max fitness: -1.0[K
[611/1000] max fitness: -1.0[K
[612/1000] max fitness: -1.0[K
[613/1000] max fitness: -1.0[K
[614/1000] max fitness: -1.0[K
[615/1000] max fitness: -1.0[K
[616/1000] max fitness: -1.0[K
[617/1000] max fitness: -1.0[K
[618/1000] max fitness: -1.0[K
[619/1000] max fitness: -1.0[K
[620/1000] max fitness: -1.0[K
[621/1000] max fitness: -1.0[K
[622/1000] max fitness: -1.0[K
[623/1000] max fitness: -1.101514265906959e-32[K
Total running time of the script: ( 0 minutes 39.584 seconds)