Hello,
using the eaSimple algorithmen I get after the first population this error:
gen evals std max avg min
0 10 [49.66, 3.982e+04] [175.9, 9.974e+04] [47.52, 2.009e+04] [0.8, 7.5]
Traceback (most recent call last):
File "deap_ga_onemax.py", line 122, in <module>
main()
File "deap_ga_onemax.py", line 115, in main
newpop = algorithms.eaSimple(pop, toolbox, cxpb=0.5, mutpb=0.2, ngen=NGEN, stats=stats, halloffame=hof, verbose=True)
File "/data/Software/Python/EDP/Env/User/lib/python2.7/site-packages/deap-0.9.1-py2.7.egg/deap/algorithms.py", line 152, in eaSimple
offspring = varAnd(offspring, toolbox, cxpb, mutpb)
File "/data/Software/Python/EDP/Env/User/lib/python2.7/site-packages/deap-0.9.1-py2.7.egg/deap/algorithms.py", line 72, in varAnd
offspring[i-1], offspring[i] = toolbox.mate(offspring[i-1], offspring[i])
File "/data/Software/Python/EDP/Env/User/lib/python2.7/site-packages/deap-0.9.1-py2.7.egg/deap/tools.py", line 737, in cxTwoPoints
cxpoint2 = random.randint(1, size - 1)
File "/data/Software/Python/EDP/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/random.py", line 241, in randint
return self.randrange(a, b+1)
File "/data/Software/Python/EDP/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/random.py", line 217, in randrange
raise ValueError, "empty range for randrange() (%d,%d, %d)" % (istart, istop, width)
ValueError: empty range for randrange() (1,1, 0)
I attached it togeterh with the python script.