Thank you so much for responding so quickly. Unfortunately I am still a little unclear about it and having some problems.
I am still struggling to understand your response. What does "by inheritance" mean? Is there a certain syntax for the toolbox.register() function for the individual? So the first argument in quotes is the name of a standard function for the toolbox that the main algorithms expect to find. But in the case of the individual, which I define in creator to be of type list, how can I populate the toolbox to bring in a list from a custom function and include the fitness? I am not sure how I can use the tools that I see to use inside the toolbox.register function to do what I am doing in my function.
The reason that I made a custom function is because I want the list to have a certain structure. This is a bounded knapsack problem, so the first n entries all correspond to a particular knapsack item. Then the next k entries correspond to the next item, etc. I am using a binary representation, so it will be all zeroes and ones.
When I made the change you suggested that error stopped. Now, however, I get another error (below). Do you think this is caused by the same problem? I just get the sense that I am not using the toolbox function correctly. Any help is really appreciated.
Liz
File "W:/My Documents/WDC.py", line 237, in GA
pop[:] = toolbox.select(pop+offspring, 100)
File "C:\Anaconda3\lib\site-packages\deap\tools\emo.py", line 33, in selNSGA2
assignCrowdingDist(front)
File "C:\Anaconda3\lib\site-packages\deap\tools\emo.py", line 123, in assignCrowdingDist
crowd.sort(key=lambda element: element[0][i])
File "C:\Anaconda3\lib\site-packages\deap\tools\emo.py", line 123, in <lambda>
crowd.sort(key=lambda element: element[0][i])
IndexError: tuple index out of range