I've noticed that my individuals (using GE) are each copy of a single parent from previous generation (unless mutated).
Debugging this, it seems that the problem is at ListCrossoverPipeline.java:
if (split[i][0] > split[i][1]) // swap so 0 is before 1
{
int temp = split[i][0];
split[i][0] = split[i][1];
split[i][1] = temp;
}
int len = split[i][0] - split[i][1];
if (len >= min_chunks[i] && len <= max_chunks[i]) // okay
{
split[i][0] *= chunk_size;
split[i][1] *= chunk_size;
break;
}
attempts++;
if (attempts > numTries) break; // uh oh
}
If makes sure that split[i][0] <= split[i][1], which means that len <= 0. However, min_chunks[i] is non negative, thus if (len >= min_chunks[i] && is false, and the code never succeed (unless, split[i][0] == split[i][1]), but that probably won't do much...)
I've noticed that my individuals (using GE) are each copy of a single parent from previous generation (unless mutated). Debugging this, it seems that the problem is at ListCrossoverPipeline.java:
If makes sure that
split[i][0] <= split[i][1]
, which means thatlen <= 0
. However,min_chunks[i]
is non negative, thusif (len >= min_chunks[i] &&
isfalse
, and the code never succeed (unless,split[i][0] == split[i][1])
, but that probably won't do much...)