Hello, I posted following issue and was suggested to mail here by Gilles: https://issues.apache.org/jira/browse/MATH-1451
I've found an infinite loop when recombining two integers Chromosomes admitting duplicates with CycleCrossover class. For example, recombining example Chromosomes it works fine, but, if you substitute all "8" with "7", you run into an infinite loop while mating. I attached to the issue the self-contained unit test (JUnit) for a better comprehension (issue a mvn clean install to run). I'd suggest to either: - reduce scope to permutations not allowing duplicates (strictly ordered), which should be stated by documentation and checked as a precondition by code. - patch it, creating a CycleCrossoverDuplicates: I quickly applied a patch, which I'd be happy to provide, nonetheless could be less efficient than original algorithm due to more complex checks. And programmed by someone who has no knowledge of this code, either :) Let me know if I can contribute in any way. Thanks for your attention, Gabriele Rossi --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org