I'm new to DEAP, so this is super-basic a noob question, for which I apologise. I'm trying to create individuals defined as a 10-element list of integers between 0 and 150. As a minimal working example, I modified the OneMax example (
code here), using
mutUniformInt as the mutation function. I get the error:
TypeError: object of type 'int' has no len() (
Traceback here). When I use binaries with mutFlipBit, everything is fine.
It seems to me that after the first generation, the individuals are integers rather than lists of integers, and so
len(individual) in mutation.py is invalid, although this doesn't make sense to me that this could change. What am I doing wrong?
Any help would be greatly appreciated!
Herman