python code for GA optimization based on deap