onclave / NSGA-II

an implementation of NSGA-II in java
MIT License
44 stars 23 forks source link

there is aproblem in binaryTournamentSelection #1

Closed whynotybb closed 5 years ago

whynotybb commented 6 years ago

private static Chromosome binaryTournamentSelection(Population population) { Chromosome individual1 = population.getPopulace().get(LOCAL_RANDOM.nextInt(population.getPopulace().size())); Chromosome individual2 = population.getPopulace().get(LOCAL_RANDOM.nextInt(population.getPopulace().size()));

        if(individual1.getFitness() > individual2.getFitness())
            return individual1;
        else return individual2;
    }

after the first generation,it should use crowded-comparison operator, As says in the Article in SectionIII part C: It is important to note that we use a binary tournament selection operator but the selection criterion is now based on the crowded-comparison operator.

onclave commented 6 years ago

I'll look into it and get back to you as soon as possible.

whynotybb commented 6 years ago

thank you very much

onclave commented 5 years ago

@whynotybb hello, I know this has taken way too long, but your issue has been resolved. Yes, on the previous implementation, there was this problem that you were highlighting in this issue, but it has now been resolved in v2 implementation of the algorithm. Please check the latest release here. This new implementation is also much simpler to understand. The previous one was unnecessarily much complex.

While I did resolve your issue much earlier, I was also working on a better implementation of NSGA-II. I have now updated the repository. Sorry for such a long delay.

I am closing this issue, but if you have any queries, please feel free to reopen this issue and I shall try to help you with your problem.