Sakarah / GeneTipe

OCaml Genetic Algorithm student project for French TIPE
GNU General Public License v3.0
5 stars 2 forks source link

Remove duplicate individuals #8

Closed Sakarah closed 8 years ago

Sakarah commented 8 years ago

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 !

nchataing commented 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

Gabzcr commented 8 years ago

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.

Sakarah commented 8 years ago

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.