Examples of TruncationSelection


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

  public static TrainEA constructNEATTrainer(final NEATPopulation population,
      final CalculateScore calculateScore) {
    final TrainEA result = new TrainEA(population, calculateScore);
    result.setSpeciation(new OriginalNEATSpeciation());

    result.setSelection(new TruncationSelection(result, 0.3));
    final CompoundOperator weightMutation = new CompoundOperator();
    weightMutation.getComponents().add(
        0.1125,
        new NEATMutateWeights(new SelectFixed(1),
            new MutatePerturbLinkWeight(0.02)));
View Full Code Here

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

      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
        public Component getListCellRendererComponent(JList list,
View Full Code Here

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

      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
        public Component getListCellRendererComponent(JList list,
View Full Code Here

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

      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
        public Component getListCellRendererComponent(JList list, Object value,
View Full Code Here

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

      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
        public Component getListCellRendererComponent(JList list, Object value,
View Full Code Here

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


    @Test
    public void testChangeSelection()
    {
        SelectionStrategy<Object> quarter = new TruncationSelection(0.25);
        SelectionStrategy<Object> half = new TruncationSelection(0.5);
        List<SelectionStrategy<? super Object>> strategies = new LinkedList<SelectionStrategy<? super Object>>();
        strategies.add(quarter);
        strategies.add(half);
        SelectionStrategyControl<Object> control = new SelectionStrategyControl<Object>(strategies);
View Full Code Here

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


    @Test(dependsOnMethods = "testChangeSelection")
    public void testReset()
    {
        SelectionStrategy<Object> quarter = new TruncationSelection(0.25);
        SelectionStrategy<Object> half = new TruncationSelection(0.5);
        List<SelectionStrategy<? super Object>> strategies = new LinkedList<SelectionStrategy<? super Object>>();
        strategies.add(quarter);
        strategies.add(half);
        SelectionStrategyControl<Object> control = new SelectionStrategyControl<Object>(strategies);
View Full Code Here

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

        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

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

     */
    @Test
    public void testWithMutation()
    {
        TravellingSalesmanStrategy strategy = new EvolutionaryTravellingSalesman(data,
                                                                                 new TruncationSelection(0.5),
                                                                                 10, // Small population.
                                                                                 0, // No elitism.
                                                                                 3, // Only a few generations.
                                                                                 false, // Cross-over.
                                                                                 true); // Mutation.
View Full Code Here

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

     */
    @Test
    public void testWithCrossover()
    {
        TravellingSalesmanStrategy strategy = new EvolutionaryTravellingSalesman(data,
                                                                                 new TruncationSelection(0.5),
                                                                                 10, // Small population.
                                                                                 0, // No elitism.
                                                                                 3, // Only a few generations.
                                                                                 true, // Cross-over
                                                                                 false); // Mutation.
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.