You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because RankSelection, RouletteWheelSelection and TournamentSelection can produce a generation where multiple instances of same chromosome occures it might result in mutation will affect all occurances of that chromosome.
Possible solutions:
use Clone method of IChromosome inside these selections
before saving chromosmes into new generation create new collection that comtains their copies, using Clone method
make mutations produce new chromosome instead of modifying current one (might better for perfromance compare to 1 and 2)
p.s. I'v not tested if it actually happens, only read the code (I'm working on a project that has similar stuff). I searched for all places where Clone method is called and did not found any usages that can solve this potential issue.
The text was updated successfully, but these errors were encountered:
Features
* #62 - Suggestion: Add an ability to set PRNG's initial seed
Bug fixes
* #72 - GeneticAlgorithm.BestChromosome.Fitness decrease over time when using EliteSelection
* #92 - Multiple occurances of same chromosome instance in generation
Because
RankSelection
,RouletteWheelSelection
andTournamentSelection
can produce a generation where multiple instances of same chromosome occures it might result in mutation will affect all occurances of that chromosome.Possible solutions:
Clone
method ofIChromosome
inside these selectionsClone
methodp.s. I'v not tested if it actually happens, only read the code (I'm working on a project that has similar stuff). I searched for all places where
Clone
method is called and did not found any usages that can solve this potential issue.The text was updated successfully, but these errors were encountered: