Use of super-genes (validation rules) can also help. Create a rule so that only chromosomes without duplicated genes survive to the next generation.
Or maybe redesign the chromosome so duplicated values are allowed.
Sent: Thursday, October 31, 2013 3:24 AM
Subject: [jgap-users] How to avoid duplication of same gene values in achromosome
I am setting up a chromosome with the use of the custom gene implementation  with random generation of integers which is later used to retrieve an object to be set as the gene.
How ever at some points two or three random integers generation is the same integer value so the chromosome consists duplicate objects.

I want to avoid having duplicate objects in the chromosome, will the compare-to method in Custom-Gene class help. Any ideas?


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.

jgap-users mailing list