最近到了pyevolve,我已经非常感谢这个模块了。
但我得到一个我无法理解的错误。
这种情况如下:
Traceback (most recent call last):
File "C:\Users\*****\Documents\workspace\*****\src\sales.py", line 99, in <module>
ga.evolve(freq_stats=100)
File "C:\Python27\lib\site-packages\pyevolve\GSimpleGA.py", line 754, in evolve
self.initialize()
File "C:\Python27\lib\site-packages\pyevolve\GSimpleGA.py", line 593, in initialize
self.internalPop.initialize(ga_engine=self)
File "C:\Python27\lib\site-packages\pyevolve\GPopulation.py", line 353, in initialize
gen.initialize(**args)
File "C:\Python27\lib\site-packages\pyevolve\GenomeBase.py", line 147, in initialize
for it in self.initializator.applyFunctions(self, **args):
File "C:\Python27\lib\site-packages\pyevolve\FunctionSlot.py", line 180, in applyFunctions
yield f(obj, **args)
File "C:\Users\*****\Documents\workspace\*****\src\sales.py", line 61, in G1DListTSPInitializator
lst = [i for i in xrange(genome.listSize)]
AttributeError: G1DList instance has no attribute 'listSize'
如何解决此错误?