--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inspyred+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inspyred/88daba23-6ce7-4a33-bf39-6d81afe4bee6%40googlegroups.com.
It looks like you pulled your sample code from a multiobjective problem, but your problem appears to have only a single objective (i.e., your fitness is just a number, rather than a list of numbers). If that's true, then you don't even need to say the line that's giving you the problem.
--
Aaron Garrett
On Tue, Nov 5, 2019 at 1:46 PM <jameslau...@gmail.com> wrote:
Hello,--I am very new to genetic algorithms and coding in general. I am working on a research project for a university and needed a very simple Genetic Algorithm.I created a generator file for generating my population and an evaluator file for evaluating the fitness. I'm working on the initializer file, and it runs for three generations, but then there is the following error from line 364 in the replacer.py file:num_objectives = len(individuals[0]['individual'].fitness)TypeError: object of type 'float' has no len()If anyone could offer any help, it would be much appreciated.Thanks,Jamey Laughland
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To unsubscribe from this group and stop receiving emails from it, send an email to insp...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to inspyred+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inspyred/8ea24432-cf22-4f85-b413-ba3829735acb%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inspyred/8ea24432-cf22-4f85-b413-ba3829735acb%40googlegroups.com.