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?
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:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.