Here it comes my doubt. Im looking for minimizing my singled-objetive. When I come up for searching in the library code of DEAP of how the selection via tournament is done in reality.
def selTournament(individuals, k, tournsize, fit_attr="fitness"):
chosen = []
for i in range(k):
aspirants = selRandom(individuals, tournsize)
chosen.append(max(aspirants, key=attrgetter(fit_attr)))
return chosen
The chosen is elected by the maximum fitness, being this just the opposite of what we want.
I need somebody to give me a check of this thing that I come up with.