Closed Sakarah closed 8 years ago
We should use dictionary or hash table with {key : function ; value : nb of this function} But we would have to recode tournament to make this work
The population can't contain exactly the same individual twice anymore, but it can have two very close versions of the same individual. When trying with cos(x) for example, the algorithm finds cos(x) in the few first generations then drop it for a close function (considering fitness) that has a much higher depth.
It is required to ensure that we can have small mutations on individuals so we must keep them anyway. For the cos(x) example, this is not related with this issue of duplicate individuals. This is more related to #7. I consider the problem of duplicate individuals solved.
We really often fill the entire population with the same individual copyed again and again. This is totally useless and waste space and computation time. We have to remove them !