package jcgp.backend.modules.es; import jcgp.backend.modules.mutator.Mutator; import jcgp.backend.population.Population; import jcgp.backend.resources.Resources; import jcgp.backend.resources.parameters.IntegerParameter; import jcgp.backend.resources.parameters.Parameter; public class TournamentSelection implements EvolutionaryStrategy { private IntegerParameter tournament; public TournamentSelection() { tournament = new IntegerParameter(1, "Tournament size") { @Override public void validate(Number newValue) { // TODO this } }; } @Override public Parameter[] getLocalParameters() { return new Parameter[] {tournament}; } @Override public void evolve(Population population, Mutator mutator, Resources parameters) { tournament.set(tournament.get() + 1); // TODO implement this } @Override public String toString() { return "Tournament"; } }