giacomelli / GeneticSharp

GeneticSharp is a fast, extensible, multi-platform and multithreading C# Genetic Algorithm library that simplifies the development of applications using Genetic Algorithms (GAs).
MIT License
1.27k stars 333 forks source link

Duplicate children generated by OrderedCrossover #20

Closed Ares513 closed 6 years ago

Ares513 commented 7 years ago

The original code randomizes only once to generate two children, so this fix refactors it a bit (to prevent duplication) and ensures that randomization occurs once for every child. Otherwise, the output will be two identical twins, unless I'm mistaken.

Fixes #19

giacomelli commented 6 years ago

Closing to cleanup, if you answer the question comment on #19 we can open it again.