I started to dig into GA a little to study, and I can not find the answer to the crossover generation breakpoints. For example, if I start with my parents:
Father = [A,B,B,A,C]
Mother = [D,D,B,A,A]
At what point can I legally stop producing children to prove that all possible combinations have been exhausted? The code is as follows:
void reproduce(String[] father, String[] mother) {
double choice = Math.random() * 100;
if((int) choice % 10 < 2){
//start at father[1] and swap.
//Continue for other choices
This is a small part regarding the logic I use. So my question goes back to how can I legally determine when to stop creating children? Or is it just a math problem when I should just look at the direct permutation generator and ignore GA at the moment?
source
share