I'm implementing a genetic algorithm (NSGA2) in Scala. It is already developed and I was now testing. I used the SCH problem with n=1 (Problem Size). I think I got the right solution but with something that I consider weird. I know that the solution to this problem is [0,2]. I get most of the solutions in this interval, but some solutions are outside this interval (and have a non zero rank). I already increased the number of generations, but yield the same result.
So I use a Population of 500, and about 400 genomes are correct, but the last 100 are outside the correct interval [0,2] (And rank different of 0).
So the solution that I get is this:
If erase the last solutions (around 100) that I know are wrong (outside of [0,2]) I get the right Pareto frotier.:
Is this normal, or this indicates that is something wrong with my code?