genetic algorithm - GA Jgap: Avoid duplicates (doublettes) chromosomes where the order doesn't count -


I am implementing a genetic algorithm with GGAP to solve a problem where the chromosome integers are listed (I As a result, not just the best, keep the solution for a good solution on the result.)

Each integer should appear only once in the chromosome (I have it to fit chromosomes with duplicate ails = 0 By setting and fine ...)

My problem:

In my problem, in which the number of chromosomes appears, does not count (1 2 3 2 2 3 is similar)

So at the end of execution, I have a list of possible solutions

I have used the solution reported here to remove duplicate chromosom in this way:

  conf.getNaturalSelectors (wrong). clear (); Best chromosomaschillaic BCS = new best chromosomesichur (confe, 0.8d); Bcs.setDoubletteChromosomesAllowed (false); conf.addNaturalSelector (BCS, Incorrect);   

But it only removes the same chromosome, it does not remove for example:

  ABCDACBDBACD   

Those chromosomes represent the same solution in my problem

That's why I end up with a single list of chromosomes with the same fitness and equally meaning, but with genes in different sequences.

How I

Thank you, is a good day.

Simply sort the chromosomes before submitting them properties. Because the different sequences of the same set of integers will be sorted in the same sequence, so you can use the code you are using to remove the duplicate.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -