IBM ILOG Solver User's Manual > Evolutionary Algorithms > Using More Advanced EA Features > Using custom selectors and multiple operators > Suggested Answers

Exercise 1

Simply change the line:

if (competition.isBetterThan(candidate))

to:

if (competition.isWorseThan(candidate))

You should see that, as may be expected, the pressure of selecting poorer individuals results in a population that contains solutions with a very low number of 1's.