diff options
Diffstat (limited to 'src/jcgp/backend/modules/ea/TournamentSelection.java')
-rw-r--r-- | src/jcgp/backend/modules/ea/TournamentSelection.java | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/jcgp/backend/modules/ea/TournamentSelection.java b/src/jcgp/backend/modules/ea/TournamentSelection.java deleted file mode 100644 index baf6704..0000000 --- a/src/jcgp/backend/modules/ea/TournamentSelection.java +++ /dev/null @@ -1,53 +0,0 @@ -package jcgp.backend.modules.ea; - -import java.util.HashMap; - -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 EvolutionaryAlgorithm { - - private int fittestChromosome; - - private IntegerParameter tournament; - private HashMap<String, Parameter> localParameters; - - public TournamentSelection() { - tournament = new IntegerParameter(1, "Tournament size") { - @Override - public void validate(int newValue) { - // TODO this - } - }; - - localParameters = new HashMap<String, Parameter>(); - localParameters.put("tournament", tournament); - } - - @Override - public Parameter[] getLocalParameters() { - return new Parameter[] {tournament}; - } - - @Override - public void evolve(Population population, Mutator mutator, - Resources parameters) { - tournament.set(tournament.get() + 1); - fittestChromosome = 0; - // TODO implement this - - } - - @Override - public int getFittestChromosome() { - return fittestChromosome; - } - - @Override - public String toString() { - return "Tournament"; - } -} |