Reputation: 101
I'm using JGAP for my code and I want to evaluate chromosomes like this:
Evaluation 0:
1 2 3 4 5 6 7 8 9
Evaluation 1:
3 5 2 1 4 6 7 8 9
Until now, I'm getting chromosomes with repeated alleles, like this:
Evaluation 1:
3 3 5 6 7 8 9 9 1
Is there any configuration that I can use in order to get chromosomes with non-repeated alleles?
Upvotes: 0
Views: 211
Reputation: 1185
I am supposing that you are talking about generating the initial population of the GA, and what you should to do is to create many random orders of a certain value list.
There are many ways to do so, here's two possibilities:
Upvotes: 1