double score = value1 - value2;
if( updateFitness[0] )
{
SimpleFitness fit = ((SimpleFitness)(ind[0].fitness));
fit.trials.add(new Double(score));
// set the fitness because if we're doing Single Elimination Tournament, the tournament
// needs to know who won this time around. Don't bother declaring the ideal here.
fit.setFitness(state, score, false);
}
if( updateFitness[1] )
{
SimpleFitness fit = ((SimpleFitness)(ind[1].fitness));
fit.trials.add(new Double(-score));
// set the fitness because if we're doing Single Elimination Tournament, the tournament
// needs to know who won this time around.
fit.setFitness(state, -score, false);
}
}