Examples of TournamentSelection


Examples of com.heatonresearch.aifh.evolutionary.opp.selection.TournamentSelection

    public BasicEA(final Population thePopulation,
                   final ScoreFunction theScoreFunction) {

        this.population = thePopulation;
        this.scoreFunction = theScoreFunction;
        this.selection = new TournamentSelection(this, 4);

        // set the score compare method
        if (theScoreFunction.shouldMinimize()) {
            this.selectionComparator = new MinimizeAdjustedScoreComp();
            this.bestComparator = new MinimizeScoreComp();
View Full Code Here

Examples of com.heatonresearch.aifh.evolutionary.opp.selection.TournamentSelection

            }
        });

        // Perform the test for round counts between 1 and 10.
        for (int roundCount = 1; roundCount <= 10; roundCount++) {
            TournamentSelection selection = new TournamentSelection(train, roundCount);
            int sum = 0;
            int count = 0;
            for (int i = 0; i < 100000; i++) {
                int genomeID = selection.performSelection(rnd, species);
                Genome genome = species.getMembers().get(genomeID);
                sum += genome.getAdjustedScore();
                count++;
            }
            sum /= count;
View Full Code Here

Examples of org.apache.commons.math3.genetics.TournamentSelection

        long startTime = System.currentTimeMillis();

        // initialize a new genetic algorithm
        GeneticAlgorithm ga = new GeneticAlgorithm(new OnePointCrossover<Character>(), CROSSOVER_RATE,
                                                   new RandomCharacterMutation(), MUTATION_RATE,
                                                   new TournamentSelection(TOURNAMENT_ARITY));

        // initial population
        Population initial = getInitialPopulation();

        // stopping condition
View Full Code Here

Examples of org.apache.commons.math3.genetics.TournamentSelection

            });

            // initialize a new genetic algorithm
            ga = new GeneticAlgorithm(new UniformCrossover<Polygon>(0.5), 1.0,
                                      new RandomPolygonMutation(MUTATION_RATE, MUTATION_CHANGE), 1.0,
                                      new TournamentSelection(TOURNAMENT_ARITY));

            // initial population
            currentPopulation = getInitialPopulation();
            bestFit = currentPopulation.getFittestChromosome();
        }
View Full Code Here

Examples of org.encog.ml.ea.opp.selection.TournamentSelection

  public BasicEA(final Population thePopulation,
      final CalculateScore theScoreFunction) {

    this.population = thePopulation;
    this.scoreFunction = theScoreFunction;
    this.selection = new TournamentSelection(this, 4);
    this.rules = new BasicRuleHolder();

    // set the score compare method
    if (theScoreFunction.shouldMinimize()) {
      this.selectionComparator = new MinimizeAdjustedScoreComp();
View Full Code Here

Examples of org.uncommons.watchmaker.framework.selection.TournamentSelection

      selectionLabel = new JLabel("Selection Strategy: ");
      innerPanel.add(selectionLabel);
     
      SelectionStrategy<?>[] selectionStrategies = {new RankSelection(), new RouletteWheelSelection(),
                                                    new StochasticUniversalSampling(),
                                                    new TournamentSelection(new Probability(0.95)),
                                                    new TruncationSelection(0.5)};
     
      selectionCombo = new JComboBox(selectionStrategies);
      selectionCombo.setRenderer(new DefaultListCellRenderer() {
        @Override
View Full Code Here

Examples of org.uncommons.watchmaker.framework.selection.TournamentSelection

      selectionLabel = new JLabel("Selection Strategy: ");
      innerPanel.add(selectionLabel);
     
      SelectionStrategy<?>[] selectionStrategies = {new RankSelection(), new RouletteWheelSelection(),
                                                    new StochasticUniversalSampling(),
                                                    new TournamentSelection(new Probability(0.95)),
                                                    new TruncationSelection(0.5)};
     
      selectionCombo = new JComboBox(selectionStrategies);
      selectionCombo.setRenderer(new DefaultListCellRenderer() {
        @Override
View Full Code Here

Examples of org.uncommons.watchmaker.framework.selection.TournamentSelection

      selectionLabel = new JLabel("Selection Strategy: ");
      innerPanel.add(selectionLabel);

      SelectionStrategy<?>[] selectionStrategies = {
          new RankSelection(), new RouletteWheelSelection(),
          new StochasticUniversalSampling(), new TournamentSelection(new Probability(0.95d)),
          new TruncationSelection(0.5d)};

      selectionCombo = new JComboBox(selectionStrategies);
      selectionCombo.setRenderer(new DefaultListCellRenderer() {
        @Override
View Full Code Here

Examples of org.uncommons.watchmaker.framework.selection.TournamentSelection

      selectionLabel = new JLabel("Selection Strategy: ");
      innerPanel.add(selectionLabel);

      SelectionStrategy<?>[] selectionStrategies = {
          new RankSelection(), new RouletteWheelSelection(),
          new StochasticUniversalSampling(), new TournamentSelection(new Probability(0.95)),
          new TruncationSelection(0.5)};

      selectionCombo = new JComboBox(selectionStrategies);
      selectionCombo.setRenderer(new DefaultListCellRenderer() {
        @Override
View Full Code Here

Examples of org.uncommons.watchmaker.framework.selection.TournamentSelection

        List<SelectionStrategy<? super T>> options = new LinkedList<SelectionStrategy<? super T>>();
        options.add(new RankSelection());
        options.add(new RouletteWheelSelection());
        options.add(new SigmaScaling());
        options.add(new StochasticUniversalSampling());
        options.add(new TournamentSelection(tournamentProbability));
        options.add(new TruncationSelection(truncationRatio));
        return options;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.